Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id CAC72633725 for ; Sun, 18 Oct 2009 21:22:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 37987-07 for ; Mon, 19 Oct 2009 00:22:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id E3AC5633817 for ; Sun, 18 Oct 2009 21:22:06 -0300 (ADT) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 3FF981E0449; Mon, 19 Oct 2009 08:22:02 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fUrVWnfoJpE8; Mon, 19 Oct 2009 08:22:00 +0800 (WST) Received: from [10.1.1.5] (124-169-36-119.dyn.iinet.net.au [124.169.36.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id D77DA1E0448; Mon, 19 Oct 2009 08:21:59 +0800 (WST) Message-ID: <4ADBB127.6020008@postnewspapers.com.au> Date: Mon, 19 Oct 2009 08:21:59 +0800 From: Craig Ringer User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Brigitte und Wolfgang Pasche CC: pgsql-odbc@postgresql.org Subject: Re: Problem with psqlODBC and "call" (of Stored Procedures) References: <4AD366C6.6010406@kabelmail.de> In-Reply-To: <4AD366C6.6010406@kabelmail.de> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.74 tagged_above=-10 required=5 tests=BAYES_20=-0.74 X-Spam-Level: X-Archive-Number: 200910/21 X-Sequence-Number: 10046 Brigitte und Wolfgang Pasche wrote: > In this case, since PostgreSQL don't > know a call statement, the ODBC driver correctly transform it into a > SELECT statement. Unfortunately, the procedure parameter (datatype date) > in the escaped form is transformed removing only the curly braces and > leaving the rest untouched instead of transforming it (in a second > step??) to the correct form. This of course leads to nonsense and > results in an error message. > > My personal impression is, that this is a bug in the ODBC driver Yep, sounds like an ODBC driver bug for sure. It might even be worth grabbing the ODBC driver sources to see if you can spot the issue. As it happens, the statement could be transformed correctly by substituting 'DATE' for 'd'. -- Craig Ringer