Adding Serial Type

From: David Pratt <fairwinds(at)eastlink(dot)ca>
To: pgsql-admin(at)postgresql(dot)org
Subject: Adding Serial Type
Date: 2005-05-28 17:27:17
Message-ID: BD5CCB8C-CF9D-11D9-AEE7-000A27B3B070@eastlink.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Pretty basic question. Is it necessary to add NOT NULL or UNIQUE NOT
NULL to SERIAL or is this implicit and unnecessary?

ie.

CREATE TABLE new_table (
id SERIAL UNIQUE NOT NULL,
description TEXT NOT NULL
);

Or should I just use below because Serial type implies this.

CREATE TABLE new_table (
id SERIAL,
description TEXT NOT NULL
);

Regards,
David

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Bruno Wolff III 2005-05-28 18:27:54 Re: Adding Serial Type
Previous Message vamsi krishna 2005-05-28 13:07:34 Create relation