Re: Adding Serial Type

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: David Pratt <fairwinds(at)eastlink(dot)ca>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Adding Serial Type
Date: 2005-05-28 18:27:54
Message-ID: 20050528182754.GA11909@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sat, May 28, 2005 at 14:27:17 -0300,
David Pratt <fairwinds(at)eastlink(dot)ca> wrote:
> Pretty basic question. Is it necessary to add NOT NULL or UNIQUE NOT
> NULL to SERIAL or is this implicit and unnecessary?

Serials no longer generate a uniqie index by default. So in practice
you will normally want to declare them as PRIMARY KEYs. However there
are cases where you don't need this and the index is extra overhead.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message David Pratt 2005-05-28 19:18:30 Re: Adding Serial Type
Previous Message David Pratt 2005-05-28 17:27:17 Adding Serial Type