Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id C279663218A for ; Fri, 3 Sep 2010 11:36:09 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 63574-05 for ; Fri, 3 Sep 2010 14:36:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 5646C6318F3 for ; Fri, 3 Sep 2010 11:36:02 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o83EZu8F022387; Fri, 3 Sep 2010 10:35:57 -0400 (EDT) To: "Werner Kuhnle" cc: pgsql-odbc@postgresql.org Subject: Re: Problem with simple SELECT over ODBC In-reply-to: References: Comments: In-reply-to "Werner Kuhnle" message dated "Fri, 03 Sep 2010 09:00:45 -0000" Date: Fri, 03 Sep 2010 10:35:56 -0400 Message-ID: <22386.1283524556@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201009/2 X-Sequence-Number: 10412 "Werner Kuhnle" writes: > But when exactly the same SELECT is issued to PG over the PG ODBC driver then I get : > SQLRetcode=-1 > SqlState=42601, NativeError=7, MessageText=ERROR; syntax error at »,«; > Playing around some time with ENCODING=WIN1252 instead of UTF-8 and trying the UNICODE odbc driver instead of the ANSI driver gives the following results: > With the UNICODE driver the message does not occur, but the data returned is completely corrupted. > With ENCODING=WIN1252 the message is slightly different: > SQLRetcode=-1 > SqlState=42601, NativeError=7, MessageText=ERROR; syntax error at »,«; > What's wrong here ? No idea, but the first thing I'd try is looking into the server's log to see what it thought the received query was. Anything that generates an error would be logged by default. regards, tom lane