Re: serial properties - Mailing list pgsql-general

From Richard Huxton
Subject Re: serial properties
Date
Msg-id 002d01c0a294$133b8060$1001a8c0@archonet.com
Whole thread Raw
In response to serial properties  ("Martin A. Marques" <martin@math.unl.edu.ar>)
List pgsql-general
From: "Martin A. Marques" <martin@math.unl.edu.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


pgsql-general by date:

Previous
From: "Jens Hartwig"
Date:
Subject: AW: AW: Addison-Wesley looking for authors
Next
From: Richard Huxton
Date:
Subject: Re: EXECUTE in PLPGSQL