Update command on view returns tuples - Mailing list pgsql-general

From Han Holl
Subject Update command on view returns tuples
Date
Msg-id 200212111123.58823.han.holl@prismant.nl
Whole thread Raw
List 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 by date:

Previous
From: Bret Hughes
Date:
Subject: Re: postponing index updates in a transaction
Next
From: Han Holl
Date:
Subject: Re: Postgresql and Ruby - any opensource software done with these two ?