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

Re: Rules with conditions over views don't work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jmfernandez(at)cnb(dot)uam(dot)es, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Rules with conditions over views don't work
Date: 2001-07-06 18:42:54
Message-ID: 17732.994444974@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
pgsql-bugs(at)postgresql(dot)org writes:
> 	Since PostgreSQL 7.1 (or 7.0, I don't remember), if you define a view, and then a rule with a condition over the view, the rule doesn't work when you try to do an operation from the type defined in the rule (it echoes an error message). But, if you also define an empty rule of the same type on the same view with no condition, the rule starts working.

This is not a bug, it's intentional.

Your suggestion of making the query rewrite limit a parameter seems like
a good one.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2001-07-06 18:49:26
Subject: Re: Referential Integrity corrupted sometimes by Rules
Previous:From: pgsql-bugsDate: 2001-07-06 18:08:55
Subject: Referential Integrity corrupted sometimes by Rules

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