Thread: [unix]postgresql pl/sql scripts
01-22-04, 05:51 #1Registered User
- Join Date
- Jan 2004
Unanswered: [unix]postgresql pl/sql scripts
I'm currently learning postgresql under unix systems.
I have still some questions about it...because I don't find any documentation about how to use postgreSQL in shellscripts neither using it with external .sql style files.
1/ isn't it existing a "SPOOL" subcommand like in oracle ?
SPOOL ../log/foo.bar.log .... SPOOL OFF
actually I use something like that
a shell-script-----calling---->SQL file----using---->shellcommand
is it possible to do like
a shell-script----calling---->SQL file-----using---->parameters ?
for example :
#!/bin/sh toto=4 psql -qf foo.sql -o foo.log
...\set toto \! '\\''`echo $toto`'\\''
thanks for the help
(If you have some very good links to documentation about programming postgreSQL inside shellscripts and external .sql file, please give them all)