Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
От | David G. Johnston |
---|---|
Тема | Re: [HACKERS] PSQL commands: \quit_if, \quit_unless |
Дата | |
Msg-id | CAKFQuwYAPvbzATpZ81zuFWYC0MABqeF3ML4yMPMkwieMyUWkbA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] PSQL commands: \quit_if, \quit_unless (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
|
Список | pgsql-hackers |
I see your point. Just out of curiosity, why in the world don't you
use something other than psql for scripting? I mean, if you accessed
the data from Perl or Python or
$INSERT_YOUR_FAVORITE_SCRIPTING_LANGUAGE_HERE, you could do all of
this stuff very easily without any contortions. I've always thought
of psql as something that's fine for interactive use and goofy trivial
scripting but not really suitable for serious work. I grant that you
seem to be making it serve the purpose, but, man.
I'm coming to the realization that this sentiment, when applied to my primary application, is probably correct...
In my situation the scripting language of choice is Bash - which largely acts as glue for programs such as psql, pdftk, enscript, and the R language.
Being able to do more conditional work in psql would make setting up more robust scripts easier and without either losing transaction capabilities or session pooling for improved performance when large numbers of small commands are run in between flow control in done in bash.
David J.
В списке pgsql-hackers по дате отправления: