Re: - Mailing list pgsql-novice

From Tom Lane
Subject Re:
Date
Msg-id 12016.1028689949@sss.pgh.pa.us
Whole thread Raw
In response to ...  (<steven_pannel@yahoo.com>)
List pgsql-novice
<steven_pannel@yahoo.com> writes:
> why does the following generate an error in postgresql 6.5?

> create table test2(city varchar(35) NULL );
> ERROR:  parser: parse error at or near "null"

NOT NULL is in the SQL specification.  NULL is not (it's the default
behavior and so they saw no need to specify it explicitly).

More recent versions of PG will take NULL, for compatibility with
certain not-very-standards-aware commercial products.  But leave it
out and you'll be happy.

            regards, tom lane

pgsql-novice by date:

Previous
From: Ron Johnson
Date:
Subject: Re: File size limit on pg_dumpall
Next
From: "Robin"
Date:
Subject: Locked out of postgres on my redhat 7.3