Re: BUG #6271: psql -f reporting unexpected syntax errors on first command

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Shannon <shannon(at)arc(dot)net(dot)au>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6271: psql -f reporting unexpected syntax errors on first command
Date: 2011-10-26 16:39:14
Message-ID: 1319647154.566.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On ons, 2011-10-26 at 04:08 +0000, Shannon wrote:
> The following bug has been logged online:
>
> Bug reference: 6271
> Logged by: Shannon
> Email address: shannon(at)arc(dot)net(dot)au
> PostgreSQL version: 8.4.9
> Operating system: Gentoo Linux 64bit
> Description: psql -f reporting unexpected syntax errors on first
> command
> Details:
>
> Given the following 2 line SQL script in a file:
>
> --- test.sql ---
> SHOW client_encoding;
> SHOW client_encoding;
> ----------------
>
> $ psql -ftest.sql -U postgres template1
>
> psql:test.sql:1: ERROR: syntax error at or near "SHOW"
> LINE 1: SHOW client_encoding;
> ^
> client_encoding
> -----------------
> UTF8
> (1 row)

Look at the file with a hex editor or od or something like that to see
whether there are any "invisible" characters on the first line. A
Unicode byte-order mark is a possibility.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2011-10-26 16:50:29 Re: BUG #6271: psql -f reporting unexpected syntax errors on first command
Previous Message Simon Riggs 2011-10-26 08:36:57 Re: BUG #6269: Anomaly detection