Update command on view returns tuples

Поиск
Список
Период
Сортировка
От Han Holl
Тема Update command on view returns tuples
Дата
Msg-id 200212111123.58823.han.holl@prismant.nl
обсуждение исходный текст
Список pgsql-general
Hello,

If I do:
UPDATE table SET column = 'value' where column = 'othervalue';
in psql, I get something like
UPDATE 14.

But if 'table' is in fact a view, and I do the update via the rule:
CREATE RULE somerule AS ON UPDATE TO table DO INSTEAD select
somefunction(...);
I get 14 tuples back with the result of each somefuntion().
Defining somefunction() to return void doesn't help, I get 14 tuples
with null.

Is there a workaround for this behaviour? Shouldn't it be transparant
for a client whether an UPDATE is on a table or on a view ?

Cheers,

Han Holl


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

Предыдущее
От: Bret Hughes
Дата:
Сообщение: Re: postponing index updates in a transaction
Следующее
От: Han Holl
Дата:
Сообщение: Re: Postgresql and Ruby - any opensource software done with these two ?