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 pete...@gmx.net wrote: On 8/9/12 9:08 AM, Robert Haas wrote: On Wed, Aug 8, 2012 at 6:50 PM, David Fetter da...@fetter.org wrote: I'm wondering if perhaps -- in addition to what you've done here -- we should make psql -1 error out if reading

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 da...@fetter.org 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

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

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

2013-05-10 Thread Tom Lane
Christopher Browne cbbro...@gmail.com writes: On Fri, May 10, 2013 at 9:50 AM, Peter Eisentraut pete...@gmx.net 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

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

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 da...@fetter.org 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;

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 file go through process_file() while having psql -1 file still go through MainLoop() directly. This isn't a good idea, because that means that any other

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 coe...@cri.ensmp.fr 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

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 coe...@cri.ensmp.fr 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-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 input.sql

[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