| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | jwieck(at)debis(dot)com (Jan Wieck) |
| Cc: | chris(dot)bitmead(at)bigfoot(dot)com, hackers(at)postgreSQL(dot)org |
| Subject: | Re: [HACKERS] Heads up: does RULES regress test still work for you? |
| Date: | 1999-05-25 14:37:57 |
| Message-ID: | 2968.927643077@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
jwieck(at)debis(dot)com (Jan Wieck) writes:
>> This is so weird, I can't even explain it.
> I can reproduce it - yes totally weird :-)
>>>> Does the following indicate a bug? It sure is wierd. Maybe some of these
>>>> statements aren't supported by postgresql (??), but the outcome doesn't
>>>> make sense to me.
>>>>
>>>> httpd=> CREATE TABLE x (y text);
>>>> CREATE
>>>> httpd=> CREATE VIEW z AS select * from x;
>>>> CREATE
>>>> httpd=> CREATE TABLE a (b text) INHERITS(z);
>>>> CREATE
>>>> httpd=> INSERT INTO x VALUES ('foo');
>>>> INSERT 168602 1
>>>> httpd=> select * from z*;
>>>> y
>>>> ---
>>>> foo
>>>> foo
>>>> (2 rows)
>>>>
>>>> How did we suddenly get two rows??
Is it a bug? It looks to me like a inherited z's view of x (and thus
when you selected from both a and z by using "z*", you got x's contents
twice). Is that wrong? If so, why?
If inheriting from a view is allowed at all (maybe it shouldn't be),
then I'd *expect* the view-ness to be inherited.
Offhand, given that tables and views are different kinds of things,
allowing a table to inherit from a view seems like a bad idea.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 1999-05-25 14:42:39 | INSERT INTO view means what exactly? |
| Previous Message | Wheeler, Alfred | 1999-05-25 14:16:24 | unsubscribe pgsql-hackers |