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


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: (view raw, whole thread or download thread mbox)
Lists: pgsql-generalpgsql-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

pgsql-hackers by date

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

pgsql-general by date

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

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