Re: [ADMIN] multiple sql results to shell

Поиск
Список
Период
Сортировка
От Geoff Winkless
Тема Re: [ADMIN] multiple sql results to shell
Дата
Msg-id CAEzk6ffJ+Br0tRcL2e+VhPUfdicR2wObh8S=tdwJ1+o7+Sof=g@mail.gmail.com
обсуждение исходный текст
Список pgsql-admin
On 23 October 2017 at 23:14, Randy Strauss <rstr@stanford.edu> wrote:
> To get input from a file w/o a sub-shell,
> you can put the input at the end of the loop:

That's a good point: and it also jogged my memory that in bash you can
do process substitution, so

while read a; do $a; done < <(psql -tqAX -c 'SELECT ...')

will keep the read loop in the main process, not the child (unlike the
"| while read" syntax)

Geoff


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

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

Предыдущее
От: Geoff Winkless
Дата:
Сообщение: Re: [ADMIN] Processing very large TEXT columns (300MB+) using C/libpq
Следующее
От: Bear Giles
Дата:
Сообщение: Re: [ADMIN] Processing very large TEXT columns (300MB+) using C/libpq