Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id C7A281337B8B; Fri, 3 Dec 2010 21:45:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 58897-06; Sat, 4 Dec 2010 01:45:43 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id 36AC41337B89; Fri, 3 Dec 2010 21:45:41 -0400 (AST) Received: from dsl081-245-111.sfo1.dsl.speakeasy.net ([64.81.245.111] helo=Sidney-Stratton.local) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1POhBx-00049e-1j; Fri, 03 Dec 2010 17:45:39 -0800 Message-ID: <4CF99D40.90306@agliodbs.com> Date: Fri, 03 Dec 2010 17:45:36 -0800 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Willy-Bas Loos CC: pgsql-admin@postgresql.org, pgadmin-support@postgresql.org Subject: Re: [ADMIN] syntax error for no apparent reason References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201012/20 X-Sequence-Number: 10959 > I've encountered this before, psql gives me a syntax error for no clear > reason. It's allways on the first character of a sql file. > I think that there must be some strange character code at the first > position, maybe it is because i share a ntfs partition with the windows > installation on my laptop and move files around. Yeah, this is caused by pgadmin adding a unicode marker at the first position of the file. If you uncheck "Read and Write Unicode UTF-8 Files" in the preferences, this issue should go away. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com