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
rulereplaced 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
withan update of another table; an update was replaced with an update. Then I should expect to see the status of the
lastquery 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@sss.pgh.pa.us>
To: Brent Reid <bfraci@aol.com>
Cc: pgsql-bugs@postgresql.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@aol.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