Re: Command Triggers, patch v11

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)postgresql(dot)org, Thom Brown <thom(at)linux(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>
Subject: Re: Command Triggers, patch v11
Date: 2012-03-19 17:06:25
Message-ID: CA+TgmoZKTfj3EMKow42mwt3zbfPN-V-bOJsExJ3avnezEceQkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 19, 2012 at 12:53 PM, Peter Eisentraut <peter_e(at)gmx(dot)net> wrote:
> On sön, 2012-03-18 at 21:16 -0400, Tom Lane wrote:
>> If we were going to change the output at all, I would vote for "CREATE
>> TABLE nnnn" so as to preserve the rowcount functionality.  Keep in
>> mind though that this would force client-side changes, for instance in
>> libpq's PQcmdTuples().  Fixing that one routine isn't so painful, but
>> what of other client-side libraries, not to mention applications?
>
> Doesn't seem worth it to me.  At least, "SELECT nnnn" makes some sense:
> nnnn rows were selected.  "CREATE TABLE nnnn" means what?  nnnn tables
> were created?
>
> What might make sense is to delegate this additional information to
> separate fields in a future protocol revision.

I think that we would not have bothered to add the row count to the
command tag output for SELECT unless it were useful. It seems to be
*more* useful for CTAS than for SELECT; after all, SELECT also returns
the actual rows.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marco Nenciarini 2012-03-19 17:41:39 Re: [PATCH] Support for foreign keys with arrays
Previous Message Peter Eisentraut 2012-03-19 16:53:21 Re: Command Triggers, patch v11