Re: About auto_increment

From: "Raymond O'Donnell" <rod(at)iol(dot)ie>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: About auto_increment
Date: 2007-01-02 15:54:08
Message-ID: 459A8020.22087.93F457@rod.iol.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1 Jan 2007 at 21:21, Yesh wrote:

> I need to know how to increment a primary key field automatically in
> run time.

Use type SERIAL as your primary key - here is the relevant page in
the docs:

http://www.postgresql.org/docs/8.2/static/datatype-
numeric.html#DATATYPE-SERIAL

HTH,

--Ray.

----------------------------------------------------------------------

Raymond O'Donnell
Director of Music, Galway Cathedral, Galway, Ireland
rod(at)iol(dot)ie
----------------------------------------------------------------------

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2007-01-02 15:56:10 Re: Geographical redundancy
Previous Message Richard Huxton 2007-01-02 15:54:03 Re: About auto_increment