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

From Ron Johnson
Subject Re: IS it a good practice to use SERIAL as Primary Key?
Date
Msg-id 4565DFB1.5010503@cox.net
Whole thread Raw
In response to Re: IS it a good practice to use SERIAL as Primary Key?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/23/06 10:49, Martijn van Oosterhout wrote:
> 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.

$ SET GEEZER
$ WRITE SYS$OUTPUT "THAT'S JUST EXTRA CYCLES WASTED BY THE"
$ WRITE SYS$OUTPUT "CLIENT.  BETTER TO USE THEM FOR SOME OTHER"
$ WRITE SYS$OUTPUT "MORE PRODUCTIVE PURPOSE."
$ SET NOGEEZER

That's the VAX/VMS in me oozing out.  But seriously, regenerate it
on demand???  That's not how it works.  This isn't a CRC or hash
function.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFZd+xS9HxQb37XmcRAgB9AJ99CR+I7NvxMWtJkFENPP/IRJUq7QCg709/
eC2gtd+QLk1+PiTU/ub5WOU=
=VuM+
-----END PGP SIGNATURE-----

pgsql-general by date:

Previous
From: "Tomi NA"
Date:
Subject: Re: MSSQL to PostgreSQL : Encoding problem
Next
From: "Sander Steffann"
Date:
Subject: Re: IS it a good practice to use SERIAL as Primary Key?