Search Postgresql Archives

Re: Utility of OIDs in postgres

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

 



On Thu, May 03, 2007 at 10:58:38AM +1200, Brent Wood wrote:
> As oid is unique across all tables (in fact all database objects), but 
> serial is unique within a table, there are odd cases like this where 
> using an oid in each table ensures an automatic unique key in the view. 
> So oids can be useful.

As pointed out already, this isn't true. However, for the case you
provide you can also use tableoid which uniquely identifies the table.
Thus the combination of a serial primary and table oid is unique across
a single DB.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[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