Skip site navigation (1) Skip section navigation (2)


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: (view raw or whole 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);
> 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

1) Column Constraint definition:
            [ CONSTRAINT name ] NOT NULL
2) Default clause:
            DEFAULT NULL


In response to

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group