Re: proposal: multiple psql option -c

Поиск
Список
Период
Сортировка
От Marc Mamin
Тема Re: proposal: multiple psql option -c
Дата
Msg-id B6F6FD62F2624C4C9916AC0175D56D8828C18ABC@jenmbs01.ad.intershop.net
обсуждение исходный текст
Ответ на Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: proposal: multiple psql option -c  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><br /> ><br /> ><br />
>2015-07-285:24 GMT+02:00 Pavel Stehule <pavel.stehule@gmail.com>:<br /> ><br /> >    2015-07-27 21:57
GMT+02:00Andrew Dunstan <andrew@dunslane.net>:<br /> ><br /> >        On 07/27/2015 02:53 PM, Pavel Stehule
wrote:<br/> ><br /> >            I am trying to run parallel execution<br /> ><br /> >            psql -At
-c"select datname from pg_database" postgres | xargs -n 1 -P 3 psql -c "select current_database()"<br /> ><br />
><br/> ><br /> >        I don't think it's going to be a hugely important feature, but I don't see a problem
withcreating a new option (-C seems fine) which would have the same effect as if the arguments were contatenated into a
filewhich is then used with -f. IIRC -c has some special characteristics which means it's probably best not to try to
extendit for this feature.<br /> ><br /> ><br /> >    ok, I'll try to write patch.<br /> ><br /> ><br />
>Ihave a question. Can be -C option multiple?<br /><br /><br /> hello,<br /> Have you thought of how to support -1
alongwith -C ?<br /><br /> > handle the input as with -f<br />      that is, -1 -C would be equivalent to -c<br
/><br/> and<br /> psql -1 -C "sql_1; sql_2;" -C "sql_3; sql_4;"<br /><br /> => ?<br /><br /> BEGIN;         <br />
sql_1;        <br /> sql_2;         <br /> END;         <br /><br /> BEGIN;<br /> sql_3;<br /> sql_4;<br /> END;<br
/><br/> thoughts ?<br /><br /> The same logic could be added to -f<br /> although I see less advantages as with adding
-C<br/><br /> psql -1 -f "file1, file2" -f "file3, file4"<br /><br /> regards,<br /> Marc Mamin</div> 

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

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [DESIGN] ParallelAppend
Следующее
От: Egor Rogov
Дата:
Сообщение: Re: REVOKE [ADMIN OPTION FOR] ROLE