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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: proposal: pg_restore --convert-to-text
Дата
Msg-id 24868.1550106683@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: proposal: pg_restore --convert-to-text  (Euler Taveira <euler@timbira.com.br>)
Список pgsql-hackers
Euler Taveira <euler@timbira.com.br> writes:
> Em qua, 13 de fev de 2019 às 19:56, Andrew Gierth
> <andrew@tao11.riddles.org.uk> escreveu:
>> 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.

I won't take a position on whether it's okay to break backwards
compatibility here (although I can think of some people who are
likely to complain ;-)).  But if we decide to do it, I like
Euler's suggestion for how to do it.  A separate --convert-to-text
switch seems kind of ugly, plus if that's the approach it'd be hard
to write scripts that work with different pg_restore versions.

The idea of cross-version-compatible scripts suggests that we
might consider back-patching the addition of "-f -", though not
the change that says you must write it.

            regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Proposed refactoring of planner header files
Следующее
От: Amit Langote
Дата:
Сообщение: grouping_planner refactoring