Re: [SOLVED] Rules in views, how to? - Mailing list pgsql-general

From Sam Mason
Subject Re: [SOLVED] Rules in views, how to?
Date
Msg-id 20100706131233.GS7584@samason.me.uk
Whole thread Raw
In response to Re: [SOLVED] Rules in views, how to?  (Andre Lopes <lopes80andre@gmail.com>)
List pgsql-general
On Tue, Jul 06, 2010 at 12:55:22PM +0100, Andre Lopes wrote:
>         update aau_utilizadores
>         set group_id = 3
>         where email = pEMAIL;
[..]
> If I use the clause WHERE only in "id" will not work fot both cases, or will
> work?

Yes, it'll do the "right thing".  OLD always refers to the previous
version of the row and NEW refers to the new version of the row, you can
use as many or few of the columns as you want.

--
  Sam  http://samason.me.uk/

pgsql-general by date:

Previous
From: Andre Lopes
Date:
Subject: Re: [SOLVED] Rules in views, how to?
Next
From: Alban Hertroys
Date:
Subject: Re: Rules in views, how to?