Re: proposal: multiple psql option -c
От | dinesh kumar |
---|---|
Тема | Re: proposal: multiple psql option -c |
Дата | |
Msg-id | CALnrH7pFNk8TYwbxHH_SaQ-iEmbzvEz4VxAGZmna=J_wTwWStg@mail.gmail.com обсуждение исходный текст |
Ответ на | proposal: multiple psql option -c (Pavel Stehule <pavel.stehule@gmail.com>) |
Ответы |
Re: proposal: multiple psql option -c
|
Список | pgsql-hackers |
On Thu, Jul 16, 2015 at 12:42 PM, Pavel Stehule <pavel.stehule@gmail.com> wrote:
Ideas, notes, comments?xargs -n 1 -P 3 psql -c "..." -c "..."psql -At -c "select datname from pg_databases" postgres | \or on all dbpsql -c "select pg_stat_reset()" -c "vacuum full analyze" dbnameExample:Why? Because some statements like VACUUM cannot be used together with any other statements with single -c option. The current solution is using echo and pipe op, but it is a complication in some complex scripts - higher complication when you run psql via multiple sudo statement.Hican we support multiple "-c" option?
IMO, rather having multiple -c args, it would be good to have another flag like "-C" which do accept and execute multiple SQL statements in sequential.
Best Regards,
Dinesh
RegardsPavel
В списке pgsql-hackers по дате отправления: