Re: proposal: pg_restore --convert-to-text

Поиск
Список
Период
Сортировка
От Euler Taveira
Тема Re: proposal: pg_restore --convert-to-text
Дата
Msg-id CAHE3wggPoiDi27TbA0DT4ns9YENzNkffV+Zc0XwHk6s9syKChg@mail.gmail.com
обсуждение исходный текст
Ответ на proposal: pg_restore --convert-to-text  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: proposal: pg_restore --convert-to-text  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: proposal: pg_restore --convert-to-text  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
Em qua, 13 de fev de 2019 às 19:56, Andrew Gierth
<andrew@tao11.riddles.org.uk> escreveu:
> One of the remarkably common user errors with pg_restore is users
> leaving off the -d option. (We get cases of it regularly on the IRC
> channel, including one just now which prompted me to finally propose
> this)
>
I'm not sure it is a common error. If you want to restore schema
and/or data it is natural that I should specify the database name (or
at least PGDATABASE).

> I propose we add a new option: --convert-to-text or some such name, and
> then make pg_restore throw a usage error if neither -d nor the new
> option is given.
>
However, I agree that pg_restore to stdout if -d wasn't specified is
not a good default. The current behavior is the same as "-f -"
(however, pg_restore doesn't allow - meaning stdout). Isn't it the
case to error out if -d or -f wasn't specified? If we go to this road,
-f option should allow - (stdout) as parameter.

> (Yes, it will break the scripts of anyone who is currently scripting
> pg_restore to output SQL text. How many people do that?)
>
I use pg_restore to stdout a lot but I wouldn't bother to specify an
option to get it (such as pg_restore -Fc -f - /tmp/foo.dmp).


--
   Euler Taveira                                   Timbira -
http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Using POPCNT and other advanced bit manipulation instructions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Reaping Temp tables to avoid XID wraparound