From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julius Stroffek <Julius.Stroffek@sun.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: 'on insert do instead' rule with a where clause responds 'INSERT 0 0'
Date: Fri, 07 Sep 2007 11:36:03 -0400
Message-ID: <22418.1189179363@sss.pgh.pa.us> (raw)
In-Reply-To: <46E16058.4070602@Sun.COM>
References: <46E16058.4070602@Sun.COM>
Julius Stroffek <Julius.Stroffek@sun.com> writes:
> Attached is the example script 'repro.sql' which creates two relations
> tab1 and tab2. It also creates a rule on tab1 which simply does insert
> into tab2. The insert statement into tab1 is executed afterwards. It
> responds with 'INSERT 0 1'. However if I would create the same rule with
> the where clause the response to the same insert statement is 'INSERT 0
> 0'. The output of the script executed through psql is in 'repro.out'.
> Is this a bug?
No. See
http://www.postgresql.org/docs/8.2/static/rules-status.html
and note that you don't have an unconditional INSTEAD rule.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: tgl@sss.pgh.pa.us, Julius.Stroffek@sun.com, pgsql-bugs@postgresql.org
Subject: Re: 'on insert do instead' rule with a where clause responds 'INSERT 0 0'
In-Reply-To: <22418.1189179363@sss.pgh.pa.us>
References: <46E16058.4070602@Sun.COM> <22418.1189179363@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox