Re: [HACKERS] PSQL commands: \quit_if, \quit_unless

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Дата
Msg-id CAKFQuwbGNMyONp9JaoQkxWid3aehLR8DZnRZsFbpMHPERw7W3w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] PSQL commands: \quit_if, \quit_unless  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Список pgsql-hackers
On Mon, Dec 19, 2016 at 11:23 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
David G. Johnston wrote:

> 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.

Have you tried to script processes in shell using a single background
psql process with which the shell code communicates using a pipe?  I've
long been curious about that approach, but never had a strong need
enough to actually write the code.  It should be possible.

​I've envisioned and read up a bit on the approach but the cost-benefit hasn't yet made actually doing it worthwhile.

I do pretty much myself run all of the scripts I've been writing - the cost-benefit ratio is likely to change once they are turned over to a non-programmer to run.

David J.​

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] PSQL commands: \quit_if, \quit_unless
Следующее
От: David Fetter
Дата:
Сообщение: Re: [HACKERS] pg_background contrib module proposal