Search Postgresql Archives

Re: CREATE TABLE initial value for PRIMARY KEY

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

 



Use a sequence and set the initial value of the sequence.

> -----Original Message-----
> From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-
> owner@xxxxxxxxxxxxxx] On Behalf Of Maurice Yarrow
> Sent: Friday, October 27, 2006 11:51 AM
> To: pgsql-general@xxxxxxxxxxxxxx
> Subject: [GENERAL] CREATE TABLE initial value for PRIMARY KEY
> 
> Hello Postgres community
> 
> Is there a formal way to set an initial value for a PRIMARY KEY
> when CREATE TABLE ?  (This would be some large number,
> typically.)
> 
> Or is it only possible to do this by first creating the table, and
> then inserting a bogus record forcing the initial value by
> specification (and then, presumably, deleting this bogus
> record)  ?
> 
> Maurice Yarrow
> 
> 
> 
> ---------------------------(end of
broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster


[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