Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eP7RJ-0003HM-Gb for pgsql-docs@arkaria.postgresql.org; Wed, 13 Dec 2017 13:51:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eP7RJ-0003xN-3q for pgsql-docs@arkaria.postgresql.org; Wed, 13 Dec 2017 13:51:13 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eP7RI-0003xC-PB for pgsql-docs@lists.postgresql.org; Wed, 13 Dec 2017 13:51:12 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eP7R9-00087O-Sy for pgsql-docs@postgresql.org; Wed, 13 Dec 2017 13:51:11 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id E0C6D21C0695 for ; Wed, 13 Dec 2017 16:51:00 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru Received: from ars-thinkpad (gw.postgrespro.ru [93.174.131.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id C5CD621C014A for ; Wed, 13 Dec 2017 16:50:59 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1513173059; bh=gyOUbjM1Qs0c9KEtDgFoJwyVYBhMpxB9lZv9zrxO9as=; h=From:To:Subject:Date; b=dZyUZ3dFst776eiAXRxrULhT6Zg30DKrvPrNeFkeVriIs0Yq1ij22atdnVCy31Ags hTTrHyAX6RngUFHMZaZxnplb+TisluvIfTNg6lrpVp77nWyR4QC1MsM5FgJrW3VJli XVwNW8Nna+azHR7iOBL6wglkvn3ewE57P+PMQHjA= From: Arseny Sher To: pgsql-docs@postgresql.org Subject: Is PQgetResult() guaranteed to return the whole SQL command result? Date: Wed, 13 Dec 2017 16:50:59 +0300 Message-ID: <87o9n2hh30.fsf@ars-thinkpad> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I wonder is it guaranteed that one PQgetResult() call returns result for the whole one statement (SQL command) in usual (not SingleRow) mode? For instance, if I run PQsendQuery with query consisting of two statements (separated by semicolons), is possible to have three or more PQgetResult calls returning data? I guess not, but it seems to be not clear from the docs. PQgetResult description says: Waits for the next result from a prior call... Does one "result" here correspond to one statement? -- Arseny Sher Postgres Professional: http://www.postgrespro.com The Russian Postgres Company