Re: Better alternative for Primary Key then serial??

From: Jorge Godoy <jgodoy(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Better alternative for Primary Key then serial??
Date: 2007-12-13 09:19:54
Message-ID: 200712130719.54781.jgodoy@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Em Wednesday 12 December 2007 03:42:55 pilzner escreveu:
>
> Does stuff like this cause any aches and pains to developers out there, or
> do I just need to get in a new mindset??? Also, is there a way to be sure
> the primary key is *ONLY* ever given a value by serial, and not subject to
> updates???

Shouldn't the definition of a primary key be an immutable thing that is unique
to the row? If you change it, then it is not immutable anymore...

You can also have triggers to prevent PK updates... But I wouldn't go this
route.

Why are you needing updating the PKs of your data?

--
Jorge Godoy <jgodoy(at)gmail(dot)com>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2007-12-13 09:45:47 Re: Slow PITR restore
Previous Message bookman bookman 2007-12-13 09:12:20 Re: How can I insert NULL into column with the type of timestamp?