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

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: IS it a good practice to use SERIAL as Primary Key?
Date: 2006-11-23 16:49:10
Message-ID: 20061123164910.GA14956@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-11-23 16:50:45 Re: COPY FROM : out of memory
Previous Message Charles Ambrose 2006-11-23 16:32:30 A generic trigger to log chanes on database tables