Re: What's wrong about this sql statement?

Поиск
Список
Период
Сортировка
От Richard Poole
Тема Re: What's wrong about this sql statement?
Дата
Msg-id 20010831160842.G24593@office.vi.net
обсуждение исходный текст
Ответ на What's wrong about this sql statement?  ("Corn" <corn@tryit.com>)
Список pgsql-general
On Fri, Aug 31, 2001 at 03:58:45PM +0800, Corn wrote:
> I am newbie. Try to create a table like this.
>
> CREATE TABLE usersright (
>     userid INTEGER NOT NULL,
>     rightid INTEGER NOT NULL,
>     allow BOOLEAN NOT NULL DEFAULT FALSE
> CONSTRAINT pk_usersright PRIMARY KEY (userid, rightid)
> );
>
> But I got the following error message:
>
> ERROR: parser: parse error at or near "("
>
> I am following the syntax of SQL statement reference from postgresql web
> site.

Not quite. You need another comma after the FALSE:

CREATE TABLE usersright (
    userid INTEGER NOT NULL,
    rightid INTEGER NOT NULL,
    allow BOOLEAN NOT NULL DEFAULT FALSE,
CONSTRAINT pk_usersright PRIMARY KEY (userid, rightid)
);

Richard

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: PostgreSQL On the Mac? OS9 or OSX?
Следующее
От: "Mikheev, Vadim"
Дата:
Сообщение: Re: getting the oid for a new tuple in a BEFORE trigger