Re: BUG #2779: Making an inherited table to a view causes could not open relation error in base table

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Sven Klemm" <sven(at)c3d2(dot)de>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2779: Making an inherited table to a view causes could not open relation error in base table
Date: 2006-11-24 21:37:21
Message-ID: 26912.1164404241@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Sven Klemm" <sven(at)c3d2(dot)de> writes:
> CREATE TABLE base( name TEXT );
> CREATE TABLE child() INHERITS( base );

> CREATE RULE "_RETURN" AS ON SELECT TO child DO INSTEAD SELECT 'Chunky
> Bacon'::text AS name;

This is definitely in the category of "don't do that". It's an
oversight that DefineQueryRewrite() doesn't check for the case.

Actually, I wonder whether we still need to support conversion of
tables to views at all. That was never meant as anything but a
temporary hack to allow loading pre-7.1 pg_dump scripts.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2006-11-24 21:45:32 Re: BUG #2779: Making an inherited table to a view causes could not open relation error in base table
Previous Message Sven Klemm 2006-11-24 18:35:44 BUG #2779: Making an inherited table to a view causes could not open relation error in base table