parse error at or near "(" -- Huh???

From: Alex Beamish <talexb(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: parse error at or near "(" -- Huh???
Date: 2004-12-09 20:19:56
Message-ID: f9870c010412091219495dbb8e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I'm getting a frustrating error

ERROR: parser: parse error at or near "(" at character 201

in a CREATE TABLE statement from an SQL script that I'm running from
within a Perl script. When I run the same script from the command
line, either as a regular user or as root, it works fine.

The SQL is
---------------------------------------------------------
CREATE SEQUENCE "users_id"
START 1 INCREMENT 1 MAXVALUE 2147483647 MINVALUE 1 CACHE 1;

CREATE TABLE "users" (
"u_id" integer DEFAULT nextval('users_id'::text) NOT NULL,
"u_name" text NOT NULL,
"u_password" text NOT NULL,
"u_console_flag" integer DEFAULT 0,
Constraint "users_pkey" Primary Key ("u_id")
);
---------------------------------------------------------

The 'console_flag' field was recently added and is close-ish to the
point that I think the parser is failing. And speaking of that, how I
am to interpret 'character 201' -- should I collapse the SQL into it's
minimal state (least number spaces) and go from that?

Thanks.

Alex

ps Tried to join the list using
http://webmail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&func=lists-long-full&extra=pgsql-sql
but got a server timeout. :(

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomas =?iso-8859-1?q?Sk=E4re?= 2004-12-10 11:40:50 Query is not using index when it should
Previous Message Kevin B. 2004-12-09 15:25:25 filtering