system maintained keys
Started by Stefan Lindnerover 24 years ago2 messagesgeneral
Is there any way to get system maintained keys from postgres? e.g. to
have a table with a primary key column (varchar or int) and let postgres
chose the next unique value for this column?
Re: system maintained keys
"Stefan Lindner" wrote:
Is there any way to get system maintained keys from postgres? e.g. to
have a table with a primary key column (varchar or int) and let postgres
chose the next unique value for this column?
The SERIAL data type does this. It is an INTEGER with a sequence attached.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
"Trust in the LORD, and do good..." Psalms 37:3