view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef())
От | Zakkr |
---|---|
Тема | view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef()) |
Дата | |
Msg-id | Pine.LNX.3.96.991029105037.14899A-100000@ara.zf.jcu.cz обсуждение исходный текст |
Ответ на | Bug(?) in pg_get_ruledef() (Zakkr <zakkr@zf.jcu.cz>) |
Ответы |
Re: [HACKERS] view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef())
Re: [HACKERS] view vs. inheritance hierarchy (was: Bug(?) in pg_get_ruledef()) |
Список | 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 по дате отправления: