Foreign Keys referencing a View

Поиск
Список
Период
Сортировка
От Alessio Bragadini
Тема Foreign Keys referencing a View
Дата
Msg-id 38EC8126.B465B89E@albourne.com
обсуждение исходный текст
Список pgsql-hackers
Hi,
I noticed a behaviour in PostgreSql 7 (beta 3, Alpha, Digital Unix 4.0f,
cc) that probably needs to be addressed.

If I create a table referencing a view

create table mytable (id serial, name text);
create view myview as select * from mytable where name like 'A%';
create table othertable (id serial, refer integer references myview
(id));

the engine doesn't complain, but

insert into mytable (name) values ('Alpha');
insert into othertable (refer) values (1);
ERROR:  system column oid not available - myview is a view

which looks sensible. But probably the errors should have been raised at 
'create table othertable'.

What do you think?

-- 
Alessio F. Bragadini        alessio@albourne.com
APL Financial Services        http://www.sevenseas.org/~alessio
Nicosia, Cyprus             phone: +357-2-750652

"It is more complicated than you think"    -- The Eighth Networking Truth from RFC 1925


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Karel Zak
Дата:
Сообщение: pg_dumplo, thanks :) (fwd)
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: 7.1 items