Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2013-05-11 Thread Robert Haas
On Fri, May 10, 2013 at 9:50 AM, Peter Eisentraut wrote: > On 8/9/12 9:08 AM, Robert Haas wrote: >> On Wed, Aug 8, 2012 at 6:50 PM, David Fetter wrote: I'm wondering if perhaps -- in addition to what you've done here -- we should make "psql -1" error out if reading from a terminal. >>>

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2013-05-10 Thread Fabien COELHO
My first use of 9.3beta1 in development failed because of changes introduced by this patch, specifically because of the newly introduced error psql: -1 is incompatible with -c and -l I'm not convinced this is correct. -c and -l are single-transaction actions almost by definition. This par

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2013-05-10 Thread Tom Lane
Christopher Browne writes: > On Fri, May 10, 2013 at 9:50 AM, Peter Eisentraut wrote: >> My first use of 9.3beta1 in development failed because of changes >> introduced by this patch, specifically because of the newly introduced >> error >> >> psql: -1 is incompatible with -c and -l >> >> I'm n

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2013-05-10 Thread Christopher Browne
On Fri, May 10, 2013 at 9:50 AM, Peter Eisentraut wrote: > On 8/9/12 9:08 AM, Robert Haas wrote: > > On Wed, Aug 8, 2012 at 6:50 PM, David Fetter wrote: > >>> I'm wondering if perhaps -- in addition to what you've done here -- we > >>> should make "psql -1" error out if reading from a terminal.

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2013-05-10 Thread Peter Eisentraut
On 8/9/12 9:08 AM, Robert Haas wrote: > On Wed, Aug 8, 2012 at 6:50 PM, David Fetter wrote: >>> I'm wondering if perhaps -- in addition to what you've done here -- we >>> should make "psql -1" error out if reading from a terminal. >> >> +1 for this. > > OK, done. > > I had to revise the original

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2012-08-09 Thread Fabien COELHO
OK, done. I had to revise the original patch pretty heavily before committing; the original patch assumed that it was OK to make psql -1 Yep. I did that with a "smallest" and "simplest" change in mind, and beside when doing "psql -1 < file", you're hardly going to do anything else anyway, s

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2012-08-09 Thread Robert Haas
On Wed, Aug 8, 2012 at 6:50 PM, David Fetter wrote: >> I'm wondering if perhaps -- in addition to what you've done here -- we >> should make "psql -1" error out if reading from a terminal. > > +1 for this. OK, done. I had to revise the original patch pretty heavily before committing; the origina

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2012-08-08 Thread David Fetter
On Wed, Aug 08, 2012 at 04:55:43PM -0400, Robert Haas wrote: > On Wed, Aug 1, 2012 at 4:28 AM, Fabien COELHO wrote: > > Dear PostgreSQL developers, > > > > Plese find attached a patch so that: > > > > Make "psql -1 < file.sql" work as with "-f" > > > > Make psql --single-transaction option

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2012-08-08 Thread Robert Haas
On Wed, Aug 1, 2012 at 4:28 AM, Fabien COELHO wrote: > Dear PostgreSQL developers, > > Plese find attached a patch so that: > > Make "psql -1 < file.sql" work as with "-f" > > Make psql --single-transaction option work on a non-interactive > standard input as well, so that "psql -1 < i

Re: [HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2012-08-03 Thread Fabien COELHO
Here is a new submission with the expected "context diff format". Dear PostgreSQL developers, Plese find attached a patch so that: Make "psql -1 < file.sql" work as with "-f" Make psql --single-transaction option work on a non-interactive standard input as well, so that "psql -1 < i

[HACKERS] [PATCH] Make "psql -1 < file.sql" work as with "-f"

2012-08-01 Thread Fabien COELHO
Dear PostgreSQL developers, Plese find attached a patch so that: Make "psql -1 < file.sql" work as with "-f" Make psql --single-transaction option work on a non-interactive standard input as well, so that "psql -1 < input.sql" behaves as "psql -1 -f input.sql". This saner/less