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

Re: 'on insert do instead' rule with a where clause responds 'INSERT 0 0'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Julius Stroffek <Julius(dot)Stroffek(at)sun(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: 'on insert do instead' rule with a where clause responds 'INSERT 0 0'
Date: 2007-09-07 15:36:03
Message-ID: 22418.1189179363@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-jdbc
Julius Stroffek <Julius(dot)Stroffek(at)sun(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Christian PANELDate: 2007-09-07 16:35:44
Subject: BUG #3605: impossible loading
Previous:From: Julius StroffekDate: 2007-09-07 14:29:44
Subject: 'on insert do instead' rule with a where clause responds 'INSERT 0 0'

pgsql-jdbc by date

Next:From: Josh BerkusDate: 2007-09-07 17:04:43
Subject: Re: Caching driver on pgFoundry?
Previous:From: Heikki LinnakangasDate: 2007-09-07 15:05:37
Subject: Re: Fwd: Caching driver on pgFoundry?

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