Search Postgresql Archives

Re: Better alternative for Primary Key then serial??

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

 



pilzner wrote:

> 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???

It doesn't.  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.

-- 
Alvaro Herrera                         http://www.flickr.com/photos/alvherre/
"Vivir y dejar de vivir son soluciones imaginarias.
La existencia está en otra parte" (Andre Breton)

---------------------------(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