view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef()) - Mailing list pgsql-hackers

From Zakkr
Subject view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef())
Date
Msg-id Pine.LNX.3.96.991029105037.14899A-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Bug(?) in pg_get_ruledef()  (Zakkr <zakkr@zf.jcu.cz>)
Responses Re: [HACKERS] view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef())  (wieck@debis.com (Jan Wieck))
Re: [HACKERS] view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef())  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

Hi,

my first question was without answer, I try it again:

IMHO is a problem with the routine pg_get_ruledef(), this routine is used in 
any query in the pg_dump for view dumping. But the pg_get_ruledef() not discern 
contrast between view rules defined as 'select * table' and rules defined as 
'select * table*' (the query should be run over all classes in the 
inheritance hierarchy).   
Is it a bug or a limitation? (The pg_dump is unworkable for a views tables 
runnig over the inheritance hierarchy?) Problem example:---------------  abil=> create table mother_tab (aaa
int);CREATEabil=>create table son () inherits(mother_tab);CREATEabil=> create view v_mother as select * from
mother_tab*;CREATEabil=>insert into son values (111);INSERT 4946878 1abil=> select * from v_mother;aaa---111(1
row)abil=>SELECT pg_get_ruledef(pg_rewrite.rulename) FROM pg_rewrite WHERErulename ='_RETv_mother';
 
CREATE RULE "_RETv_mother" AS ON SELECT TO "v_mother" DO INSTEAD SELECT"mother_tab"."aaa" FROM "mother_tab";(1 row)
                   ^^^^^^^^^^^^            but right is "mother_tab*"
 

---Any comments? (Please)
                        Karel Z.



pgsql-hackers by date:

Previous
From: Zeugswetter Andreas IZ5
Date:
Subject: AW: [HACKERS] Bug#48582: psql spends hours computing results it a lready knows (fwd)
Next
From: SAKAIDA
Date:
Subject: pgbash-1.2.1 released