Received: from odysseus1.dohle.com (odysseus1.dohle.com [194.127.185.21]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1DBm6x66514 for ; Tue, 13 Feb 2001 06:48:06 -0500 (EST) (envelope-from vpaul@dohle.com) Received: from majestix.dohle.com (majestix.dohle.com [194.127.190.1]) by odysseus1.dohle.com (8.9.3/8.9.3) with SMTP id MAA17350 for ; Tue, 13 Feb 2001 12:48:02 +0100 Received: from wpaul.dohle.com by majestix.dohle.com id aa18501; 13 Feb 101 12:48 CET Message-ID: <3A892433.879F40A0@dohle.com> Date: Tue, 13 Feb 2001 13:10:27 +0100 From: Volker Paul Organization: Dohle Handelsgruppe Systemberatung GmbH X-Mailer: Mozilla 4.05 [en] (WinNT; I) MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: C/C++ interface Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200102/243 X-Sequence-Number: 1434 Hello, in the C interface documentation there is an example using: res = PQexec(conn, "DECLARE mycursor CURSOR FOR select * from pg_database"); if (!res || PQresultStatus(res) != PGRES_COMMAND_OK) { fprintf(stderr, "DECLARE CURSOR command failed\n"); PQclear(res); exit_nicely(conn); } PQclear(res); res = PQexec(conn, "FETCH ALL in mycursor"); ...etc. So the statements are: DECLARE mycursor CURSOR FOR select * from pg_database; FETCH ALL in mycursor; What's the difference between this and simply doing: select * from pg_database; I tried this in psql, the result seemed the same. What I'm really using, however, is the C++ interface. Its documentation is not yet complete. There, too, I tried a version with and without cursor. The result seems to be the same, but returned int is always 0 for the version without cursor, so I get no information whether the query succeeded. Is someone maintaining the C++ interface and its documentation? Thanks, Volker Paul