Re: NULL & NOT NULL

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: NULL & NOT NULL
Дата
Msg-id 36824A47.697E1BB8@alumni.caltech.edu
обсуждение исходный текст
Ответы Re: [HACKERS] Re: NULL & NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] 6.4.1 HISTORY etc.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Re: NULL & NOT NULL