Re: NULL & NOT NULL

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Bill Sneed <bsneed(at)mint(dot)net>
Cc: Postgres Hackers List <hackers(at)postgresql(dot)org>, pgsql-general(at)postgresql(dot)org
Subject: Re: NULL & NOT NULL
Date: 1998-12-24 14:05:59
Message-ID: 36824A47.697E1BB8@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> > > I'm trying to "convert" the sample db found in "The Practical SQL
> > > Handbook" Bowman, et al. to postgres. When trying to create the
> > > following table I get "parser: parse error at or near 'null'"
> > > create table authors (
> > > zip char(5) null
> > > );
> > > The table creation works fine with the NOT NULL but won't work
> > > with the NULL. NULL is supported isn't it?
> > The NULL constraint syntax is *not* supported, since it results in
> > shift/reduce conflicts in our yacc parser. This is because the token
> > is ambiguous with other uses of NULL in the same area, at least as
> > far as yacc is concerned.

Sheesh. After that long song and dance about why we can't implement
this, it turns out that it works fine. We had been trying to implement a
slightly different syntax, "WITH NULL", which conflicted with the
SQL92-defined data type declaration "TIMESTAMP WITH TIME ZONE".

The "Practical SQL Handbook"-compatible form will be available in the
next full release of Postgres. Thanks.

- Tom

In response to

Browse pgsql-general by date

  From Date Subject
Next Message The Hermit Hacker 1998-12-24 20:13:28 [HACKERS] [URGENT] v6.4.1 was a mis-package...
Previous Message darold 1998-12-24 10:13:28 Backup of large object

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1998-12-24 14:33:18 Re: [HACKERS] Re: NULL & NOT NULL
Previous Message Bruce Momjian 1998-12-24 05:20:15 Re: [HACKERS] 6.4.1 HISTORY etc.