Search Postgresql Archives

Re: What's wrong with this SQL?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you count over 39 characters, you will see the parser is barking at
this:

"user_ID" SERIAL(12)
                ^

See:
http://www.postgresql.org/docs/8.1/static/datatype.html#DATATYPE-SERIAL

to find out why your definition is confusing Mr. SQL-parser.

> -----Original Message-----
> From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-
> owner@xxxxxxxxxxxxxx] On Behalf Of Adam
> Sent: Tuesday, May 09, 2006 9:06 PM
> To: pgsql-general@xxxxxxxxxxxxxx
> Subject: [GENERAL] What's wrong with this SQL?
> 
> I'm trying to create a table and I'm getting this error:
> 
>       SQL error:
> 
> 
> ERROR:  syntax error at or near "(" at character 39
>       In statement:
>       CREATE TABLE "users" ("user_ID" SERIAL(12), "first_name"
character
> varying(40) NOT NULL, "last_name" character varying(40) NOT NULL,
> "password"
> character varying(16) NOT NULL, "email" character varying(100) NOT
NULL,
> "privilege" integer(2) NOT NULL, PRIMARY KEY ("user_ID"))
> 
> 
> 
>       What's wrong with this SQL?
> 
> 
> 
> ---------------------------(end of
broadcast)---------------------------
> TIP 6: explain analyze is your friend


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux