Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 0BC9D9FB4D9 for ; Tue, 15 May 2007 09:44:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 13572-07 for ; Tue, 15 May 2007 09:44:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gauss.credativ.com (ipx11302.ipxserver.de [212.112.227.254]) by postgresql.org (Postfix) with ESMTP id 5227A9FB4E9 for ; Tue, 15 May 2007 09:44:33 -0300 (ADT) Received: from gauss.credativ.com (localhost [127.0.0.1]) by gauss.credativ.com (Postfix) with ESMTP id 8C2EDD78E0 for ; Tue, 15 May 2007 14:44:26 +0200 (CEST) Received: from feivel (unknown [87.139.82.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gauss.credativ.com (Postfix) with ESMTP id A0878D78DD for ; Tue, 15 May 2007 14:44:23 +0200 (CEST) Received: by feivel (Postfix, from userid 1000) id 52587D6CFC; Tue, 15 May 2007 14:44:19 +0200 (CEST) Date: Tue, 15 May 2007 14:44:19 +0200 From: Michael Meskes To: PostgreSQL Interfaces Subject: PQexecParams question Message-ID: <20070515124419.GA31566@feivel.credativ.de> Mail-Followup-To: PostgreSQL Interfaces MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV using ClamSMTP X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/30 X-Sequence-Number: 6537 I had a closer look at PQexecParams and even started moving ecpglib to use this function. However, there is one behaviour that troubles me some. I declare a binary cursor using PQexecParams, which of course works nicely and then fetch data from it. I'm not able to tell whether the cursor is binary, unless I keep my own client side cursor list. So I call PQexecParams with the fetch command without knowing that the results are binary. Using the default values however all data is returned in ascii. It appears you have to tell the fetch command to return data in binary, or else it will return ascii, no matter how the cursor was defined. Is this a feature? Essantially with this behaviour programmers do not need to declare binary cursors at all because for a normal cursor the behaviour is exactly the same. I can surely work around this, for instance by calling PQexec instead for fetch commands, which does the right thing, but I wonder if this is desirable. Michael -- Michael Meskes Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!