Re: NULL & NOT NULL

Поиск
Список
Период
Сортировка
От Thomas G. Lockhart
Тема Re: NULL & NOT NULL
Дата
Msg-id 36810E66.1508732E@alumni.caltech.edu
обсуждение исходный текст
Ответ на NULL & NOT NULL  (Bill Sneed <bsneed@mint.net>)
Список pgsql-general
> 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 twith 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.

However, the default behavior for all columns is to allow NULL values,
so it is a noise word which can be omitted without ill effect.

                      - Tom

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

Предыдущее
От: Adriaan Joubert
Дата:
Сообщение: Postgresql on Alpha
Следующее
От: Adriaan Joubert
Дата:
Сообщение: Re: [GENERAL] Postgres 6.4.1 on DEC-ALPHA