From: | Karel Zak - Zakkr <zakkr(at)zf(dot)jcu(dot)cz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <wieck(at)debis(dot)com> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Patch - Re: [HACKERS] view vs. inheritance hierarchy |
Date: | 1999-10-31 14:26:51 |
Message-ID: | Pine.LNX.3.96.991031151806.32618A-100000@ara.zf.jcu.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 29 Oct 1999, Tom Lane wrote:
> Zakkr <zakkr(at)zf(dot)jcu(dot)cz> writes:
> > 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?
>
> Sounds like a bug to me too. The fix is probably just a small addition
> of code, but I haven't had time to look into it.
>
> regards, tom lane
Yes, I fix this bug. Here is my patch (for /src/backend/utils/adt/ruleutils)
for it:
*** ruleutils.c.org Mon Sep 6 00:55:28 1999
--- ruleutils.c Sun Sep 31 13:37:42 1999
***************
*** 968,971 ****
--- 968,973 ----
strcat(buf, "\"");
strcat(buf, rte->relname);
+ if (rte->inh)
+ strcat(buf, "*");
strcat(buf, "\"");
if (strcmp(rte->relname, rte->refname) != 0)
***************
*** 973,976 ****
--- 975,980 ----
strcat(buf, " \"");
strcat(buf, rte->refname);
+ if (rte->inh)
+ strcat(buf, "*");
strcat(buf, "\"");
}
Add we (Jan or Tom) this code to PostgreSQL source main? (Pease).
Karel
------------------------------------------------------------------------------
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz> http://home.zf.jcu.cz/~zakkr/
Kim Project: http://home.zf.jcu.cz/~zakkr/kim/ (process manager)
FTP: ftp://ftp2.zf.jcu.cz/users/zakkr/ (C/ncurses/PgSQL)
------------------------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1999-10-31 16:59:58 | Re: Patch - Re: [HACKERS] view vs. inheritance hierarchy |
Previous Message | Bruce Momjian | 1999-10-31 13:17:32 | Re: [HACKERS] Serial and NULL values |