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

From: John McCawley <nospam(at)hardgeus(dot)com>
To: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Cc: Scott Ribe <scott_ribe(at)killerbytes(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: IS it a good practice to use SERIAL as Primary Key?
Date: 2006-11-27 23:31:55
Message-ID: 456B756B.9080303@hardgeus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I promise I'm not trying to be a pain in the butt ;) Do you then use
your serial id as your foreign key in other tables, or the
firstname/lastname primary key?

Joshua D. Drake wrote:

>users
>=====
>id serial unique,
>first_name text,
>last_name text,
>primary key (first_name,last_name)
>
>Yes there are problems with the above, namely you will likely have more
>than one joshua drake.
>
>Sincerely,
>
>Joshua D. Drake
>
>
>>
>>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Ribe 2006-11-27 23:53:43 Re: IS it a good practice to use SERIAL as Primary Key?
Previous Message Jim Nasby 2006-11-27 23:26:42 Re: Editing contrib modules which are loaded by default?