Re: Rules and Views

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Rules and Views
Дата
Msg-id 24290.1028086360@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Rules and Views  (Curt Sampson <cjs@cynic.net>)
Ответы Re: Rules and Views  (Curt Sampson <cjs@cynic.net>)
Список pgsql-hackers
Curt Sampson <cjs@cynic.net> writes:
> CREATE VIEW test AS ...
> CREATE RULE test_insert AS
>     ON INSERT TO test
>     DO  ...
> INSERT INTO test VALUES (1, 'one', 'onemore');
> ERROR:  Cannot insert into a view without an appropriate rule

> What am I doing wrong here? Is there a bug?

Make that "ON INSERT DO INSTEAD".  As coded, the rule leaves the
original insertion into the view still active.

Perhaps the error message could be phrased better --- any thoughts?
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: getpid() function
Следующее
От: Bruce Momjian
Дата:
Сообщение: Open 7.3 items