Re: create table with table constraints

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: create table with table constraints
Дата
Msg-id 17703.1134686157@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: create table with table constraints  (Jim Beckstrom <jrbeckstrom@sbcglobal.net>)
Список pgsql-novice
Jim Beckstrom <jrbeckstrom@sbcglobal.net> writes:
> Error: Unable to perform query:  CREATE TABLE client(              lastname CHAR(20) DEFAULT ' ', etc.,CONSTRAINT
program (program1, intakedate, ssnbr))ERROR:  parser: parse error at or near "(" 

You should probably try testing on something newer than 7.2 ;-).
In 8.0 and up I get a pretty clear pointer to the problem:

psql:bogus.sql:90: ERROR:  syntax error at or near "(" at character 6692
psql:bogus.sql:90: LINE 86:              CONSTRAINT clientru  (casenbr),
psql:bogus.sql:90:                                            ^

and in fact that constraint and the ones after it are missing the UNIQUE
keyword.

            regards, tom lane

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

Предыдущее
От: Jim Beckstrom
Дата:
Сообщение: Re: create table with table constraints
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: create table with table constraints