Re: Testing concurrent psql - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Testing concurrent psql
Date
Msg-id 10008.1179361191@sss.pgh.pa.us
Whole thread Raw
In response to Re: Testing concurrent psql  (Greg Stark <gsstark@mit.edu>)
Responses Re: Testing concurrent psql  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> writes:
> "Jim C. Nasby" <decibel@decibel.org> writes:
>> On Wed, May 16, 2007 at 09:43:36AM -0400, Gregory Stark wrote:
>>> I seem to recall there was a way to construct scenarios that returned multiple
>>> result sets via rules but I don't know how to arrange that. Anyone remember?
>> 
>> An ALSO SELECT rule?

> It gives you an error.

Not if you do it correctly.

regression=# create table foo(f1 int);
CREATE TABLE
regression=# create rule r1 as on insert to foo do also 
regression-# ( select 1; select 2; select 3 );
CREATE RULE
regression=# insert into foo values(42);?column? 
----------       3
(1 row)

INSERT 0 1
regression=# 

This shows BTW that PQexec throws away all but the last select-result;
but they are all delivered to the client.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Lack of urgency in 8.3 reviewing
Next
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] Full page writes improvement, code update