Re: Updatable view does not work [oops, quite long!]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Updatable view does not work [oops, quite long!]
Дата
Msg-id 29347.1054785633@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Updatable view does not work [oops, quite long!]  (Thiemo Kellner <thiemo@thiam.ch>)
Ответы Re: Updatable view does not work [oops, quite long!]
Список pgsql-novice
Thiemo Kellner <thiemo@thiam.ch> writes:
> However, I have written two more rules, one for updates and one for
> deletes. But those only work if all the fields have values. They do
> nothing with effect on the base table when applied on rows with NULL in
> the fields.

Not very surprising, since "WHERE foo = bar" cannot succeed if either
foo or bar is null.

You should not be comparing every field of the rows anyway.  You should
make sure that pwd has a primary key (which by definition must be
non-null) and then check only the primary key field or fields in the
rule WHERE clauses.

            regards, tom lane

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

Предыдущее
От: root
Дата:
Сообщение: Re: locale support ?
Следующее
От: chestie
Дата:
Сообщение: Re: Calculation error