From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Beamish <talexb@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: parse error at or near "(" -- Huh???
Date: Sun, 12 Dec 2004 21:45:49 -0500
Message-ID: <14681.1102905949@sss.pgh.pa.us> (raw)
In-Reply-To: <f9870c010412091219495dbb8e@mail.gmail.com>
References: <f9870c010412091219495dbb8e@mail.gmail.com>
Alex Beamish <talexb@gmail.com> writes:
> 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.
One would have to suppose that the Perl environment is somehow munging
the SQL commands you think you are sending. Try enabling statement
logging on the server side --- when you can see what was really sent,
all will probably become much clearer.
> 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?
One character per character, whether that be a visible character or
whitespace (including newlines). Collapsing out whitespace is
definitely not going to give you the right count.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, talexb@gmail.com
Subject: Re: parse error at or near "(" -- Huh???
In-Reply-To: <14681.1102905949@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox