Search Postgresql Archives

Re: IS it a good practice to use SERIAL as Primary Key?

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

 




On Nov 22, 2006, at 6:23 PM, carter ck wrote:

Hi all,

I am wonderring if it is a good practice to use SERIAL index as primary key, as it is only available up to 9999999?

Where did you get that idea? A serial should be good up to at least 2,000,000,000 or so, and if that's not enough there's always bigserial.


Currently i am dealing with storing LDAP users into Postgres and i am looking for a better way to make use of the DN as primary key instead of SERIAL index.

Any advice or suggestion is appreciated.

If you want a synthetic primary key then a serial field is the easiest way to create one.

Cheers,
  Steve


[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