Re:

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: steven_pannel(at)yahoo(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re:
Date: 2002-08-07 03:12:29
Message-ID: 12016.1028689949@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

<steven_pannel(at)yahoo(dot)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

In response to

  • at 2002-08-05 21:51:19 from steven_pannel

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2002-08-07 03:48:53 Re: Novice
Previous Message Ron Johnson 2002-08-06 21:01:21 Re: File size limit on pg_dumpall