| From: | pilzner <belisarius23(at)yahoo(dot)com> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Better alternative for Primary Key then serial?? | 
| Date: | 2007-12-12 20:28:37 | 
| Message-ID: | 14303222.post@talk.nabble.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Alvaro Herrera-3 wrote:
> 
> Just do not update the ID -- what use do you have for that
> anyway?  If you want to prevent it, you can put a trigger to the column,
> but IMHO it would be a waste of your time and machine resources.
> 
I have absolutely no use to update the ID. I'm not sure why anyone ever
would, and I guess I was a little shocked to find that PostGres even allows
it.
In MSSQL, an identity() is used instead of a serial, and once in place that
sucker is pretty much set in stone without a little know-how (it won't
happen by accident). I'm definitely not here for a "my way is better because
thats what I'm familiar with" discussion, just to get a feel of why its done
that way, if I'm doing anything wrong, or if there is an accepted way to
lock it down. 
-- 
View this message in context: http://www.nabble.com/Better-alternative-for-Primary-Key-then-serial---tp14289409p14303222.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Steve Crawford | 2007-12-12 20:39:17 | Re: Altering field passed as parameter to plpgsql trigger | 
| Previous Message | Richard Huxton | 2007-12-12 20:27:34 | Re: Altering field passed as parameter to plpgsql trigger |