Re: [HACKERS] missing semicolon at end of psql files

2012-09-13 Thread Noah Misch
On Wed, Sep 12, 2012 at 03:20:24PM -0400, Tom Lane wrote: > Peter Eisentraut writes: > > I was surprised to find that psql -f file.sql with a file such as this > > select 1; > > select 2 > > > executes both commands even though the second one is not terminated. > I'm a little dubious about chang

Re: [HACKERS] missing semicolon at end of psql files

2012-09-12 Thread Peter Eisentraut
On Wed, 2012-09-12 at 17:20 +0300, Heikki Linnakangas wrote: > On 12.09.2012 17:10, Peter Eisentraut wrote: > > I was surprised to find that psql -f file.sql with a file such as this > > > > select 1; > > select 2 > > > > executes both commands even though the second one is not terminated. > > > >

Re: [HACKERS] missing semicolon at end of psql files

2012-09-12 Thread Tom Lane
Peter Eisentraut writes: > I was surprised to find that psql -f file.sql with a file such as this > select 1; > select 2 > executes both commands even though the second one is not terminated. > I realize that this is inconsistently handled throughout the system, for > example libpq APIs don't ca

Re: [HACKERS] missing semicolon at end of psql files

2012-09-12 Thread Dmitriy Igrishin
2012/9/12 Peter Eisentraut > I was surprised to find that psql -f file.sql with a file such as this > > select 1; > select 2 > > executes both commands even though the second one is not terminated. > > I realize that this is inconsistently handled throughout the system, for > example libpq APIs d

[HACKERS] missing semicolon at end of psql files

2012-09-12 Thread Peter Eisentraut
I was surprised to find that psql -f file.sql with a file such as this select 1; select 2 executes both commands even though the second one is not terminated. I realize that this is inconsistently handled throughout the system, for example libpq APIs don't care about the missing semicolon, but i