Re: [GENERAL] INSTEAD rule bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dmitry Tkach <dmitry(at)openratings(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] INSTEAD rule bug?
Date: 2003-07-15 20:58:35
Message-ID: 8750.1058302715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Dmitry Tkach <dmitry(at)openratings(dot)com> writes:
> create rule insert_test as on insert to test_view where new.x is not
> null and new.y is not null do instead
> (
> insert into test
> select new.* union
> select new.*;
> );

Mmm. In CVS tip that throws

ERROR: UNION/INTERSECT/EXCEPT member statement may not refer to other relations of same query level

which was a check added as a result of this discussion thread:
http://archives.postgresql.org/pgsql-general/2003-02/msg00693.php

I am sure you are running into some misbehavior associated with the
fact that the rule transformation generates a bogusly-structured SQL
query, and 7.2 isn't noticing.

I'd like to support this case someday, but it's not clear how...

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dmitry Tkach 2003-07-15 21:15:57 Re: [GENERAL] INSTEAD rule bug?
Previous Message Dmitry Tkach 2003-07-15 20:17:24 Re: [GENERAL] INSTEAD rule bug?

Browse pgsql-general by date

  From Date Subject
Next Message Dann Corbit 2003-07-15 21:04:28 Re: Firebird vrs Postgresql
Previous Message scott.marlowe 2003-07-15 20:56:31 This whole MySQL versus PGSQL thing