From: | Ryan Bradetich <rbrad(at)hpb50023(dot)boi(dot)hp(dot)com> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] create rule changes table to view ? |
Date: | 1999-07-12 15:21:33 |
Message-ID: | 199907121521.JAA10104@hpb50023.boi.hp.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom,
The little bit of investigation I've done leads me to belive I can determine the
difference between a table and a view, because they are correctly seperated in
pg_views and pg_tables. I'll do some more research and see if I can actually do
this, or if you and Jan are right :)
Thanks,
- Ryan
> Ryan Bradetich <rbrad(at)hpb50023(dot)boi(dot)hp(dot)com> writes:
> > psql declares the the type to be view? if the relkind is a relation
> > and the relhasrules = true in pg_class for that entry. I will pull
> > the latest source and see if I can come up with a better way for
> > determining the type tomorrow, if someone else doesn't beat me to it
>
> The way Jan explained it to me, a view *is* a table that happens to
> have an "on select do instead" rule attached to it. If the table
> has data in it (which it normally wouldn't) you can't see that data
> anyway because of the select rule.
>
> This is another example like SERIAL columns, UNIQUE columns, etc, where
> we are not really leaving enough information in the system tables to
> allow accurate reconstruction of what the user originally said. Was
> it a CREATE VIEW, or a CREATE TABLE and manual attachment of a rule?
> No way to tell. In one sense it doesn't matter a whole lot, but for
> psql displays and pg_dump it would be nice to know what happened.
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 1999-07-12 15:40:58 | Re: [HACKERS] Updated TODO list |
Previous Message | Bruce Momjian | 1999-07-12 15:12:31 | Re: [HACKERS] 6.5.1 release date |