Re: [HACKERS] Re: NULL & NOT NULL

From: "Jose' Soares" <jose(at)sferacarta(dot)com>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Re: NULL & NOT NULL
Date: 1998-12-30 15:14:29
Message-ID: 368A4355.9C3417AC@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas G. Lockhart wrote:
>
> > This NULL clause is not part of constraints it is a default option and
> > we already support it,
> > prova=> CREATE TABLE table1 (field1 INTEGER DEFAULT NULL);
> > CREATE
>
> That is certainly a clearer way of specifying it. Should we forget about
> the other syntax?
>
> - Tom

Imho yes. The syntax CREATE TABLE table (field type NULL) has no sense
the NULL keyword may be used on a DEFAULT clause (if you want to specify
a default value)
or on a column constraint (if you want to avoid data integrity
violation).

1) Column Constraint definition:
[ CONSTRAINT name ] NOT NULL

2) Default clause:
DEFAULT NULL

-Jose'-

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-12-30 16:53:08 Re: [HACKERS] NUMERIC needs OID's
Previous Message Thomas G. Lockhart 1998-12-30 15:10:14 Re: [HACKERS] problems recovering 6.1 db