Search Postgresql Archives

Re: Better alternative for Primary Key then serial??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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.


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux