Skip site navigation (1) Skip section navigation (2)

Re: BUG #2102: Backend reports wrong number of affected rows for a

From: bfraci(at)aol(dot)com
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2102: Backend reports wrong number of affected rows for a
Date: 2005-12-23 16:48:03
Message-ID: 8C7D5F7C6DDBA4A-F20-818B@mblk-d40.sysops.aol.com (view raw or flat)
Thread:
Lists: pgsql-bugs
Thanks for your response.
 
Let me see if I understand this correctly.  If the original query is an update and the instead rule replaces it with an update, then I should get a return status that is not zeros.  And if the original query was an update and the instead rule replaced it with something other than an update, then I should expect the return status to be zeros.
 
In my case we have an unconditional instead rule.  The original query was an update and the instead rule replaced it with an update of another table; an update was replaced with an update.  Then I should expect to see the status of the last query that was inserted by the instead rule.  So I should not see a status of zero.
 
Is that correct?
 
Thanks for all your help,
 
Brent
 
 
 
 
 
-----Original Message-----
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brent Reid <bfraci(at)aol(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Sent: Fri, 09 Dec 2005 11:41:26 -0500
Subject: Re: [BUGS] BUG #2102: Backend reports wrong number of affected rows for a table that uses rules 


"Brent Reid" <bfraci(at)aol(dot)com> writes:
> Our Java application depends upon the return values from the various JDBC
> insert, update, and delete routines.  We noticed that the value is always
> zero when the table that is referenced has rules associated with it.

Have you read
http://www.postgresql.org/docs/8.0/static/rules-status.html

            regards, tom lane

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2005-12-23 22:38:05
Subject: Re: horology regression test failure
Previous:From: andrew_kazachkovDate: 2005-12-23 12:53:00
Subject: BUG #2124: Error "relation with OID ... does not exist" when using temporary table in function.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group