From: | Brandon Craig Rhodes <brandon(at)oit(dot)gatech(dot)edu> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | "ON INSERT rule may not use OLD" on simple query |
Date: | 2003-02-10 23:23:56 |
Message-ID: | w6bs1j7m9f.fsf@guinness.ts.gatech.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Postgresql 7.3.2 gives the error "ON INSERT rule may not use OLD" when
trying to define the following rule:
CREATE TABLE numbers ( number INTEGER );
CREATE TABLE other_numbers ( number INTEGER );
CREATE OR REPLACE RULE number_rule AS
ON INSERT TO numbers
DO INSERT INTO other_numbers
SELECT 1 EXCEPT SELECT 2;
although the rule, even upon close inspection, seems to make no
reference at all to the OLD pseudo-relation. Given the above table
definitions, the query:
SELECT 1 EXCEPT SELECT 2;
by itself runs fine and returns 1 as expected. (We have tested this
against both the unstable Debian package for 7.3.2, and against a copy
compiled locally using the standard source archive.)
--
Brandon Craig Rhodes http://www.rhodesmill.org/brandon
Georgia Tech brandon(at)oit(dot)gatech(dot)edu
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-02-10 23:28:56 | Re: 7.3.2: test select_having ... FAILED |
Previous Message | snpe | 2003-02-10 22:40:33 | Re: PostgreSQL x Oracle |