Re: Proposal: Solving the "Return proper effected tuple count - Mailing list pgsql-hackers

From Steve Howe
Subject Re: Proposal: Solving the "Return proper effected tuple count
Date
Msg-id 3784314507.20020909001900@carcass.dhs.org
Whole thread Raw
In response to Re: Proposal: Solving the "Return proper effected tuple  (Joe Conway <mail@joeconway.com>)
Responses Re: Proposal: Solving the "Return proper effected tuple
List 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@carcass.dhs.org



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Proposal: Solving the "Return proper effected tuple count
Next
From: Bruce Momjian
Date:
Subject: Re: Proposal: Solving the "Return proper effected tuple