X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 780733A6813 for ; Mon, 13 Dec 2004 03:43:20 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 42880-01 for ; Mon, 13 Dec 2004 03:43:13 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205]) by svr1.postgresql.org (Postfix) with ESMTP id 753163A682D for ; Mon, 13 Dec 2004 03:43:16 +0000 (GMT) Received: by wproxy.gmail.com with SMTP id 71so291809wri for ; Sun, 12 Dec 2004 19:43:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=bZKqJH6PeqBEUVfbhYIvXjZPgBmy8ZL4QKxSYiK+EVHAVSZB+tnaU+1lTn631LIGoM8LOXa8qtGpxJJ4mx6Y+WtHfV9GwbjDnvIfWnEfsYel8+YT/X/b9intaQPkDO158++/nqQGPvVLN7kf2OZlxRbj03DqozzMlCiY6vSlc2E= Received: by 10.54.33.33 with SMTP id g33mr278984wrg; Sun, 12 Dec 2004 19:43:16 -0800 (PST) Received: by 10.54.33.69 with HTTP; Sun, 12 Dec 2004 19:43:16 -0800 (PST) Message-ID: Date: Sun, 12 Dec 2004 22:43:16 -0500 From: Alex Beamish Reply-To: Alex Beamish To: pgsql-sql@postgresql.org Subject: Re: parse error at or near "(" -- Huh??? In-Reply-To: <20041213021800.GB67661@winnie.fuhr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <20041213021800.GB67661@winnie.fuhr.org> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.024 tagged_above=0 required=5 tests=RCVD_BY_IP X-Spam-Level: X-Archive-Number: 200412/90 X-Sequence-Number: 19710 On Sun, 12 Dec 2004 19:18:00 -0700, Michael Fuhr wrote: > On Thu, Dec 09, 2004 at 03:19:56PM -0500, Alex Beamish wrote: > > > 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. > > Your SQL statements ran fine for me, so please show us a small but > complete Perl script that duplicates the problem. Michael, Tom, Thank you both for your responses .. I discovered that, while I was editting what I thought was the running script, I was actually running an earlier (wrong) version extracted a moment earlier from the version control system, in a paralell directory. This became obvious when I deleted the offending line and the error remained exactly the same. However, I am intrigued to find out about the character offset that appears in the error. How is that calculated? This would be useful diagnostic information to have in the future. Thanks! Alex