Re: [SQL] Problems with create table continued...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Problems with create table continued...
Дата
Msg-id 20613.951712159@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problems with create table continued...  ("Seth Banks" <seth@subimage.com>)
Список pgsql-sql
"Seth Banks" <seth@subimage.com> writes:
> Anyone see a problem with this code?!
> CREATE TABLE content (
>   content_id  serial,
>   parent_id   int4 NOT NULL,
>   parent_type int4 NOT NULL,
>   author_id   int4 NOT NULL,
>   title       text NOT NULL,
>   url         text NULL,
>   start_date  date NOT NULL,
>   end_date    date NOT NULL,
>   priority    int4 NULL,
>   content     text NULL,
>   source      text NOT NULL
> );
> ERROR:  parser: parse error at or near "null"

NULL is not a valid column constraint according to SQL92.
(Even if it were valid, it'd be redundant.)  Drop that
on those three columns and you'll be fine.
        regards, tom lane


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

Предыдущее
От: "Vikrant Rathore"
Дата:
Сообщение: SQL query problem
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: [SQL] Problems with create table continued...