pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Shannon <shannon@arc.net.au>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6271: psql -f reporting unexpected syntax errors on first command
Date: Wed, 26 Oct 2011 19:39:14 +0300
Message-ID: <1319647154.566.1.camel@vanquo.pezone.net> (raw)
In-Reply-To: <201110260408.p9Q480jo087565@wwwmaster.postgresql.org>
References: <201110260408.p9Q480jo087565@wwwmaster.postgresql.org>

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@arc.net.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.





view thread (3+ messages)  latest in thread

Message-ID: <1319647154.566.1.camel@vanquo.pezone.net>
Permalink:  ../1319647154.566.1.camel@vanquo.pezone.net/
Also on:    postgresql.org/message-id/1319647154.566.1.camel@vanquo.pezone.net

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter_e@gmx.net, shannon@arc.net.au
  Subject: Re: BUG #6271: psql -f reporting unexpected syntax errors on first command
  In-Reply-To: <1319647154.566.1.camel@vanquo.pezone.net>
  References: <201110260408.p9Q480jo087565@wwwmaster.postgresql.org> <1319647154.566.1.camel@vanquo.pezone.net>

* 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