![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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; |
#3
| |||
| |||
|
|
"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. |
#4
| |||
| |||
|
|
Tom Lane wrote: 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. IIRC I tried it when I was reviewing the updatable views patch, and it worked. |
![]() |
| Thread Tools | |
| Display Modes | |
| |