Re: IS it a good practice to use SERIAL as Primary Key? - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: IS it a good practice to use SERIAL as Primary Key?
Date
Msg-id 20061123164910.GA14956@svana.org
Whole thread Raw
In response to Re: IS it a good practice to use SERIAL as Primary Key?  (Ron Johnson <ron.l.johnson@cox.net>)
Responses Re: IS it a good practice to use SERIAL as Primary Key?  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general
On Thu, Nov 23, 2006 at 10:23:55AM -0600, Ron Johnson wrote:
> For those times when and that when numeric sequences *are* needed
> (employee_id and account_number for example) they should include a
> check digit, to ensure that you don't mis-type a number and charge
> the wrong account.

Sure, but the check digit does not need to be stored, as it can be
regenerated on demand. The user interface just verifies the check
digit, then throws it away.

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

Attachment

pgsql-general by date:

Previous
From: Ron Johnson
Date:
Subject: Re: IS it a good practice to use SERIAL as Primary Key?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: COPY FROM : out of memory