Re: execute command tag including affected rows count - Mailing list pgsql-hackers

From Tom Lane
Subject Re: execute command tag including affected rows count
Date
Msg-id 7917.1079910354@sss.pgh.pa.us
Whole thread Raw
In response to Re: execute command tag including affected rows count  (Neil Conway <neilc@samurai.com>)
Responses Re: execute command tag including affected rows count  (Kris Jurka <books@ejurka.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> On 21-Mar-04, at 11:39 AM, Kris Jurka wrote:
>> Would it be possible to have the command completion tag for EXECUTE 
>> return
>> the affected row count?

> Yes, this has been suggested before -- for example:

> http://www.mail-archive.com/pgsql-hackers@postgresql.org/msg26787.html

> I agree it would be a good idea, although I can't recall what the 
> conclusion of the previous discussions was -- did anyone raise any 
> critical objections to this?

The previous discussion concluded that EXECUTE should return the command
tag of the executed command --- eg, "UPDATE n" not "EXECUTE n".  Without
this, you cannot for example sensibly cope with both the INSERT and
UPDATE tag formats.

Not sure what it takes internally to the backend to make this happen
... but IIRC there already is provision for utility commands to override
their default tag, so I hope that it would be a pretty localized change.

However, does this really solve Kris' problem?  JDBC generally likes to
think that it works with old Postgres versions; will a fix that only
works in >= 7.5 be good enough for them?
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Matthew T. O'Connor"
Date:
Subject: pg_autovacuum next steps
Next
From: Tom Lane
Date:
Subject: Re: pg_autovacuum next steps