Bug in pg_get_ruledef? - Mailing list pgsql-hackers

From Sergio Pili
Subject Bug in pg_get_ruledef?
Date
Msg-id 3C016F90.AA8824ED@sinectis.com.ar
Whole thread Raw
Responses Re: Bug in pg_get_ruledef?
Re: Bug in pg_get_ruledef?
List pgsql-hackers
Hello,

pg_get_ruledef cannot read the following rule:

test=# select version();                              version
---------------------------------------------------------------------PostgreSQL 7.2b3 on i686-pc-linux-gnu, compiled by
GCCegcs-2.91.66
 
(1 row)


With the following tables:

test=# \d rd         Table "rd"Column |   Type   | Modifiers
--------+----------+-----------a      | smallint |b      | smallint |c      | text     |
           Table "ri"Column |   Type   |  Modifiers
--------+----------+--------------d      | smallint |e      | text     |a      | smallint | default 1000b      |
smallint| default 2000
 


I create the following rule:

CREATE RULE ins_rd
AS ON INSERT TO ri
WHERE NEW.a IS NOT NULL AND NEW.b IS NOT NULL
DO       INSERT INTO rd (a,b)       select distinct new.a,new.b


The rule works well. But when i select pg_rules:

test=# select * from pg_rules;
ERROR:  Invalid attnum 3 for rangetable entry *SELECT*


Thanks in advance

Sergio.


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: RPMs and regression tests (was Re: v7.2b3 packaged...)
Next
From: Peter Eisentraut
Date:
Subject: Re: Call for objections: deprecate postmaster -o switch?