Re: interactive oddity for psql -c "cmd; cmd;" - Mailing list pgsql-hackers

From Ed Loehr
Subject Re: interactive oddity for psql -c "cmd; cmd;"
Date
Msg-id 393FD6F5.736C8CB0@austin.rr.com
Whole thread Raw
In response to Re: interactive oddity for psql -c "cmd; cmd;"  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian wrote:
> 
> > I would think this should echo *two* "INSERT <oid> 1" messages, instead
> > of just 1.
> >
> > % psql -d viewsdb -c "insert into foo(i) values (1); insert into foo(i)
> > values (2);"
> > INSERT 9968065 1
> 
> The query is sent as one string, and only one return is sent back.  It
> has always been that way.

That's unintuitive and inconsistent behavior, albeit largely
inconsequential, when compared with the same line in a script...

% psql -d vtdb 
vtdb=# INSERT INTO foo(i) values (13); INSERT INTO foo(i) values (13);
INSERT 9971328 1
INSERT 9971329 1

Regards,
Ed Loehr


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: INSTALL/install.sgml file
Next
From: Bruce Momjian
Date:
Subject: Re: postgres under gdb