Re: Concurrent psql API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Concurrent psql API
Date
Msg-id 12548.1207712252@sss.pgh.pa.us
Whole thread Raw
In response to Re: Concurrent psql API  (Shane Ambler <pgsql@Sheeky.Biz>)
List pgsql-hackers
Shane Ambler <pgsql@Sheeky.Biz> writes:
> +1 on the \g& but I would reverse the syntax -
> \g& conn1 CERATE INDEX...;

No, not good.  If the command requires multiple lines then this creates
an action-at-a-distance behavior.  Thought experiment: what would you
expect here:
\g& conn1CREATE INDEX z (<oops, made a mistake>\rCREATE INDEX q ...;

And whichever behavior you'd "expect", how would you get the other
one when you needed it?  Hidden state sucks.

(Yeah, this argument probably appeals to people who like RPN calculators
more than those who don't...)

psql's established behavior is that \g is issued after the command
it affects, and we should not change that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: File system snapshots for multiple file systems
Next
From: Andrew Chernow
Date:
Subject: Re: [PATCHES] libpq type system 0.9a