Re: interactive oddity for psql -c "cmd; cmd;"

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pghackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: interactive oddity for psql -c "cmd; cmd;"
Date: 2000-06-08 17:25:09
Message-ID: 393FD6F5.736C8CB0@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Don Baccus 2000-06-08 17:27:45 Re: Proposal: TRUNCATE TABLE table RESTRICT
Previous Message Bruce Momjian 2000-06-08 17:11:03 Re: [HACKERS] INSTALL/install.sgml file