Re: system maintained keys

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: "Stefan Lindner" <lindner(at)visionet(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: system maintained keys
Date: 2001-10-17 06:49:50
Message-ID: 200110170649.f9H6noPo012040@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)Elphick(at)lfix(dot)co(dot)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

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Elphick 2001-10-17 06:53:01 Re: Easy way of pruning pg_data?
Previous Message Andrej Falout 2001-10-17 05:23:09 Re: A tool for making console/text data enrty/display screens in C