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: shan...@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. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs