From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Corey Huinker <corey(dot)huinker(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PSQL commands: \quit_if, \quit_unless |
Date: | 2016-12-19 18:36:04 |
Message-ID: | CAKFQuwbGNMyONp9JaoQkxWid3aehLR8DZnRZsFbpMHPERw7W3w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Dec 19, 2016 at 11:23 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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.
From | Date | Subject | |
---|---|---|---|
Next Message | David Fetter | 2016-12-19 18:51:26 | Re: pg_background contrib module proposal |
Previous Message | Alvaro Herrera | 2016-12-19 18:23:49 | Re: PSQL commands: \quit_if, \quit_unless |