Re: serial properties

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: serial properties
Date: 2001-03-01 21:10:40
Message-ID: 002d01c0a294$133b8060$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: "Martin A. Marques" <martin(at)math(dot)unl(dot)edu(dot)ar>

> Hi, I would like to know which are the properties of the SERIAL type.
> Is a column defined SERIAL a primary key?
>
> Saludos... :-)

Basically serial is NOT NULL with DEFAULT of nextval(some-sequence) and a
primary key index defined on it. In fact if you do a \d on the table
concerned, that's what it'll say.

It's really just shorthand to save typing

- Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Patricia.Barnes 2001-03-01 21:15:52 Publisher seeks authors/technical reviewers
Previous Message Richard Huxton 2001-03-01 20:25:36