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

From Alban Hertroys
Subject Re: Rules in views, how to?
Date
Msg-id EF0D0D39-4F96-498D-8AB0-9E3D64A63D28@solfertje.student.utwente.nl
Whole thread Raw
In response to Re: Rules in views, how to?  (Andre Lopes <lopes80andre@gmail.com>)
List pgsql-general
On 6 Jul 2010, at 13:03, Andre Lopes wrote:

> Hi Alban,
>
> But in my application I have more than one way of uniquely identify the record. Could be by the email field or by the
idfield. 

Unique is unique. There is no other record that could possibly be identified by the same unique identifier. It doesn't
matterif you can identify the same record using other identifiers that are also unique, it's still a unique identifier.
Soif you have a unique identifier for your table you can use on the OLD row in the WHERE clause. 

For example, if you have a primary key on that table you can use it to identify the records for the update. Whether
thatPK uses a simple unique index or a composite unique index doesn't matter at all either. 

Alban Hertroys

--
Screwing up is an excellent way to attach something to the ceiling.


!DSPAM:737,4c33391e286211703874864!



pgsql-general by date:

Previous
From: Sam Mason
Date:
Subject: Re: [SOLVED] Rules in views, how to?
Next
From: Tom Lane
Date:
Subject: Re: 'default nextval()' loses schema-qualification in dump ?