Re: shell scripting
Started by Björn Lundinover 23 years ago1 messagesgeneral
Frank wrote:
Hello,
I am a PostgreSQL newbie stuck with the following question; can I write a
unix shell script with sql statements and execute this in postgresql? In
other databases one can use "@ /tmp/script.sql" or "start
/path-to-script/script.sql". How can this be done in postgresql?tia,
Frank
man psql
-c, --command query
Specifies that psql is to execute one query string,
query, and then exit. This is useful in shell
scripts.
/Bj�rn
Import Notes
Reference msg id not found: 3d8c4e73$0$34793$e4fe514c@dreader3.news.xs4all.nl