From: | Ron Johnson <ron(dot)l(dot)johnson(at)cox(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: IS it a good practice to use SERIAL as Primary Key? |
Date: | 2006-11-23 17:51:45 |
Message-ID: | 4565DFB1.5010503@cox.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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-----
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Harris | 2006-11-23 18:18:06 | Re: Shutting down a warm standby database in 8.2beta3 |
Previous Message | Tomi NA | 2006-11-23 17:15:59 | Re: MSSQL to PostgreSQL : Encoding problem |