Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 1E79F9FCB33 for ; Fri, 26 Oct 2007 09:35:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 54732-02 for ; Fri, 26 Oct 2007 09:35:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail2007.strasbourg.4js.com (mail2007.strasbourg.4js.com [84.14.60.197]) by postgresql.org (Postfix) with ESMTP id 3DEB89FCB35 for ; Fri, 26 Oct 2007 09:35:30 -0300 (ADT) Received: from [10.0.0.196] (fox.strasbourg.4js.com [10.0.0.196]) (authenticated bits=0) by mail2007.strasbourg.4js.com (8.13.8/8.13.8/Debian-3) with ESMTP id l9QCZPOP029148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 26 Oct 2007 14:35:26 +0200 Message-ID: <4721DECF.80401@4js.com> Date: Fri, 26 Oct 2007 14:34:23 +0200 From: Sebastien FLAESCH Organization: Four J's Development Tools User-Agent: Thunderbird 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-hackers@postgresql.org, Guillaume ERGAND Subject: Re: PostgreSQL 8.3, libpq and WHERE CURRENT OF References: <4721BAFE.3080601@4js.com> <4721BF34.80901@enterprisedb.com> In-Reply-To: <4721BF34.80901@enterprisedb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.91.2/4599/Fri Oct 26 13:27:38 2007 on mail2007.strasbourg.4js.com X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/1327 X-Sequence-Number: 109695 Thanks Heikki for this quick answer. Actually we do the following lipq calls: - PQPrepare(... "SELECT ... FROM ... FOR UPDATE" ... ) - PQexecPrepared(...) - PQntuples(...) / PQgetvalue(...) i.e. we don't use the DECLARE CURSOR instruction, we just prepare/execute the plain SELECT statement (with potential parameters)... I can't remember why but there was some limitation or problems to use the DECLARE CURSOR in our context... must dig in my mail archive to give you more details... FYI we do actually a PostgreSQL driver for our runtime VM... Does a simple PQPrepare() with a SELECT statement not create a cursor on the server side? If yes, would it not be possible to pass a cursor name as in ODBC? Best regards, Seb Heikki Linnakangas wrote: > Sebastien FLAESCH wrote: >> Just looked at the new features of 8.3 and realized that positioned >> updates/deletes is now possible with this new release... >> >> We would use that if we could define the cursor name with a libpq function. > > I don't understand. When you open a cursor with DECLARE CURSOR, you give > it a name. Doesn't that do what you want? >