Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-sql by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group