Re: Proposal: Solving the "Return proper effected tuple count

From: Steve Howe <howe(at)carcass(dot)dhs(dot)org>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal: Solving the "Return proper effected tuple count
Date: 2002-09-09 03:19:00
Message-ID: 3784314507.20020909001900@carcass.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Joe,

Sunday, September 8, 2002, 11:54:45 PM, you wrote:

JC> Bruce Momjian wrote:
>> I liked option #2. I don't think the _last_ query in a rule should have
>> any special handling.
>>
>> So, to summarize #2, we have:
>>
>> if no INSTEAD,
>> return value of original command
>>
>> if INSTEAD,
>> return tag of original command
>> return sum of all affected rows with the same tag
>> return OID if all INSERTs in the rule insert only one row, else zero
>>

JC> How about:

JC> if no INSTEAD,
JC> return value of original command

JC> if INSTEAD,
JC> return tag MUTATED
I see PQcmdStatus() returning a SQL command and not a pseudo-keyword,
so I don't agree with this tag.

JC> return sum of sum of tuple counts of all replacement commands
Agreed.

JC> return OID if sum of all replacement INSERTs in the rule inserted
JC> only one row, else zero
I don't agree with this one since it would lead us to a meaningless
information... what would be the number retrieved ? Not an OID, nor
nothing.

JC> I don't know about that. The number of "rows affected" is indeed this
JC> number. It's just that they were not all affected in the same way.
Agreed too...

JC> +1 for the version above ;-)
Which ? Yours or Tom's ? :)

-------------
Best regards,
Steve Howe mailto:howe(at)carcass(dot)dhs(dot)org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-09 03:21:11 Re: Proposal: Solving the "Return proper effected tuple
Previous Message Bruce Momjian 2002-09-09 03:16:32 Re: Proposal: Solving the "Return proper effected tuple count