> > > 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.
In response to
pgsql-hackers by date
|Next:||From: Tom Lane||Date: 1998-12-24 14:33:18|
|Subject: Re: [HACKERS] Re: NULL & NOT NULL |
|Previous:||From: Bruce Momjian||Date: 1998-12-24 05:20:15|
|Subject: Re: [HACKERS] 6.4.1 HISTORY etc.|
pgsql-general by date
|Next:||From: The Hermit Hacker||Date: 1998-12-24 20:13:28|
|Subject: [HACKERS] [URGENT] v6.4.1 was a mis-package...|
|Previous:||From: darold||Date: 1998-12-24 10:13:28|
|Subject: Backup of large object|