Search Postgresql Archives

Re: Rules in views, how to?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 id field.

Unique is unique. There is no other record that could possibly be identified by the same unique identifier. It doesn't matter if you can identify the same record using other identifiers that are also unique, it's still a unique identifier. So if 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 that PK 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!



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux