Insert into view

Поиск
Список
Период
Сортировка
От Theo Kramer
Тема Insert into view
Дата
Msg-id 3843A612.FBAE3F1C@flame.co.za
обсуждение исходный текст
Список pgsql-hackers
Any thoughts on the following

------------------------------ testview.sql
-------------------------------------
drop table testhead; /* If it exists */
drop table testline; /* If it exists */
drop view testview; /* If it exists */

create table testhead ( part text
);

create table testline ( part text, colour text, adate datetime default 'now'
);

create view testview as select testhead.part, testline.colour, testline.adate from testhead, testline where
testhead.part= testline.part;
 

insert into testview values  ('pen', 'green');
insert into testview values  ('pen', 'blue');
insert into testview values  ('pen', 'black');

select * from testview;

-----------------------------------------------------------------------------------

The inserts report no errors, and when looking into $PGDATA/base/mydb/testview
with a hex editor I can see the values inserted. 

The select on view returns nothing... 

Should the insert not fail seeing that views are read only ?

-- 
--------
Regards
Theo


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: [HACKERS] sort on huge table
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: [HACKERS] union and LIMIT problem