From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Euler Taveira <euler(at)timbira(dot)com(dot)br> |
Cc: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: proposal: pg_restore --convert-to-text |
Date: | 2019-02-14 01:11:23 |
Message-ID: | 24868.1550106683@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Euler Taveira <euler(at)timbira(dot)com(dot)br> writes:
> Em qua, 13 de fev de 2019 às 19:56, Andrew Gierth
> <andrew(at)tao11(dot)riddles(dot)org(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Langote | 2019-02-14 01:30:31 | grouping_planner refactoring |
Previous Message | Tom Lane | 2019-02-14 01:05:54 | Re: Proposed refactoring of planner header files |