Re: CREATE TABLE initial value for PRIMARY KEY - Mailing list pgsql-general

From Tom Lane
Subject Re: CREATE TABLE initial value for PRIMARY KEY
Date
Msg-id 8338.1161976334@sss.pgh.pa.us
Whole thread Raw
In response to CREATE TABLE initial value for PRIMARY KEY  (Maurice Yarrow <yarrow@best.com>)
List pgsql-general
Maurice Yarrow <yarrow@best.com> writes:
> Is there a formal way to set an initial value for a PRIMARY KEY
> when CREATE TABLE ?

If it's a SERIAL column, you use setval() on the underlying sequence
before you start inserting data.

            regards, tom lane

pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: CREATE TABLE initial value for PRIMARY KEY
Next
From: Sandro Dentella
Date:
Subject: Simple OUTER JOIN doubt