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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
Cc: pghackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: interactive oddity for psql -c "cmd; cmd;"
Date: 2000-06-08 16:42:05
Message-ID: 200006081642.MAA11574@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I would think this should echo *two* "INSERT <oid> 1" messages, instead
> of just 1.
>
> % createdb viewsdb
> CREATE DATABASE
> % psql -d viewsdb -c "create table foo(i integer); create table bar(j
> integer);"
> CREATE
> % psql -d viewsdb -c "insert into foo(i) values (1); insert into foo(i)
> values (2);"
> INSERT 9968065 1
> % psql -d viewsdb -c "select * from foo;"
> i
> ---
> 1
> 2
> (2 rows)
>
> % psql -d viewsdb -c "select oid from foo;"
> oid
> ---------
> 9968064
> 9968065
> (2 rows)
>

The query is sent as one string, and only one return is sent back. It
has always been that way.

--
Bruce Momjian | http://www.op.net/~candle
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ed Loehr 2000-06-08 16:42:28 interactive oddity for psql -c "cmd; cmd;"
Previous Message Bruce Momjian 2000-06-08 16:41:12 Re: crashed odbc in CVS