Re: proposal: multiple psql option -c

Поиск
Список
Период
Сортировка
От Fabrízio de Royes Mello
Тема Re: proposal: multiple psql option -c
Дата
Msg-id CAFcNs+qWU2iRY+LMmPjEf5dM=8WigboEet6tnp846LJE5sjH2g@mail.gmail.com
обсуждение исходный текст
Ответ на proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: multiple psql option -c  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
<div dir="ltr"><br />On Thu, Jul 16, 2015 at 4:42 PM, Pavel Stehule <<a
href="mailto:pavel.stehule@gmail.com">pavel.stehule@gmail.com</a>>wrote:<br />><br />> Hi<br />><br />>
canwe support multiple "-c" option?<br />><br />> Why? Because some statements like VACUUM cannot be used
togetherwith any other statements with single -c option. The current solution is using echo and pipe op, but it is a
complicationin some complex scripts - higher complication when you run psql via multiple sudo statement.<br />><br
/>>Example:<br />><br />> psql -c "select pg_stat_reset()" -c "vacuum full analyze" dbname<br />><br />>
oron all db<br />><br />> psql -At -c "select datname from pg_databases" postgres | \<br />> xargs -n 1 -P 3
psql-c "..." -c "..."<br />><br />> Ideas, notes, comments?<br />><br /><br />Why you want it if we already
havethe -f option that cover this use case?<br /><br />Regards,<br /><br />--<br />Fabrízio de Royes Mello<br
/>Consultoria/CoachingPostgreSQL<br />>> Timbira: <a
href="http://www.timbira.com.br">http://www.timbira.com.br</a><br/>>> Blog: <a
href="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br/>>> Linkedin: <a
href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a
href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/>>> Github: <a
href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div>

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: proposal: multiple psql option -c
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: multiple psql option -c