Re: Better alternative for Primary Key then serial??
От | pilzner |
---|---|
Тема | Re: Better alternative for Primary Key then serial?? |
Дата | |
Msg-id | 14303222.post@talk.nabble.com обсуждение исходный текст |
Ответ на | Re: Better alternative for Primary Key then serial?? (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: Better alternative for Primary Key then serial??
Re: Better alternative for Primary Key then serial?? |
Список | 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.
В списке pgsql-general по дате отправления: