Adding Serial Type - Mailing list pgsql-admin

From David Pratt
Subject Adding Serial Type
Date
Msg-id BD5CCB8C-CF9D-11D9-AEE7-000A27B3B070@eastlink.ca
Whole thread Raw
In response to Re: add serial no  ("Uwe C. Schroeder" <uwe@oss4u.com>)
Responses Re: Adding Serial Type  (Bruno Wolff III <bruno@wolff.to>)
Re: Adding Serial Type  (John DeSoi <desoi@pgedit.com>)
List 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

pgsql-admin by date:

Previous
From: "Mark R. Dingee"
Date:
Subject: Re: better way
Next
From: Bruno Wolff III
Date:
Subject: Re: Adding Serial Type