Re: system maintained keys - Mailing list pgsql-general

From Oliver Elphick
Subject Re: system maintained keys
Date
Msg-id 200110170649.f9H6noPo012040@linda.lfix.co.uk
Whole thread Raw
In response to system maintained keys  ("Stefan Lindner" <lindner@visionet.de>)
List pgsql-general
"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



pgsql-general by date:

Previous
From: Andrej Falout
Date:
Subject: Re: A tool for making console/text data enrty/display screens in C
Next
From: Denis Gasparin
Date:
Subject: Re: Python interface memory leak?