Received: from trillium.nmsu.edu (trillium.NMSU.Edu [128.123.5.15]) by hub.org (8.8.8/8.7.5) with ESMTP id NAA08352 for ; Wed, 15 Jul 1998 13:21:44 -0400 (EDT) Received: (from brook@localhost) by trillium.nmsu.edu (8.8.8/8.8.8) id LAA10781; Wed, 15 Jul 1998 11:21:35 -0600 (MDT) Date: Wed, 15 Jul 1998 11:21:35 -0600 (MDT) Message-Id: <199807151721.LAA10781@trillium.nmsu.edu> From: Brook Milligan To: pgsql-sql@postgresql.org Subject: limitations of views? I would like to use views and allow updates. What are the postgresql limitations imposed on views that restrict updates? I tried the following and could not update the view, but would like something more concrete about what the actual limiatations are. Thanks for your help. Cheers, Brook =========================================================================== drop table view_table_1; create table view_table_1 (id int, name text); drop table view_table_2; create table view_table_2 (id int, telephone text); drop table view_table_3; create table view_table_3 (name_id int, phone_id int); insert into view_table_1 (id, name) values (1, 'tom'); insert into view_table_1 (id, name) values (2, 'mary'); insert into view_table_2 (id, telephone) values (1, '555-1212'); insert into view_table_2 (id, telephone) values (2, '(505) 555-1212'); insert into view_table_3 (name_id, phone_id) values (1, 1); insert into view_table_3 (name_id, phone_id) values (2, 2); select * from view_table_1; select * from view_table_2; select * from view_table_3; drop view view_table; create view view_table as select names.name, phones.telephone from view_table_1 names, view_table_2 phones where names.id = view_table_3.name_id and phones.id = view_table_3.phone_id; select * from view_table; -- update fails update view_table set telephone = '505-555-1212'; select * from view_table;