Re: What's wrong with this SQL?

From: "Dann Corbit" <DCorbit(at)connx(dot)com>
To: "Adam" <adam(at)spatialsystems(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: What's wrong with this SQL?
Date: 2006-05-10 04:18:11
Message-ID: D425483C2C5C9F49B5B7A41F8944154757D8F0@postal.corporate.connx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)postgresql(dot)org [mailto:pgsql-general-
> owner(at)postgresql(dot)org] On Behalf Of Adam
> Sent: Tuesday, May 09, 2006 9:06 PM
> To: pgsql-general(at)postgresql(dot)org
> 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

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-05-10 04:19:07 Re: What's wrong with this SQL?
Previous Message Adam 2006-05-10 04:06:07 What's wrong with this SQL?