Re: What's wrong about this sql statement? - Mailing list pgsql-general

From Arne Weiner
Subject Re: What's wrong about this sql statement?
Date
Msg-id 3B8F7922.334C9D20@gmx.de
Whole thread Raw
List pgsql-general
Corn wrote:

There is a comma missing. The Statement must be

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

Tableconstraints mus be seperated by comma from coulmn definiftion.

Arne.

>
> 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.
>
> please help.
>
> thx.
>
> corn

pgsql-general by date:

Previous
From: "Graham White"
Date:
Subject: Mysql to postgres tools -reviews?
Next
From: Sean Chittenden
Date:
Subject: Re: PL/java?