Doc #79253 [Opn->Ver]: doc for pg_get_result() fails to mention its implementation is syncronous

From: Date: Thu, 09 Sep 2021 17:09:19 +0000
Subject: Doc #79253 [Opn->Ver]: doc for pg_get_result() fails to mention its implementation is syncronous
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19174@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79253&edit=1 ID: 79253 Updated by: cmb@php.net Reported by: mikko dot rantalainen at peda dot net Summary: doc for pg_get_result() fails to mention its implementation is syncronous -Status: Open +Status: Verified Type: Documentation Problem Package: Documentation problem Operating System: Ubuntu Linux 16.04 LTS PHP Version: 7.4.2 Block user comment: N Private report: N New Comment: pg_get_result() is a wrapper for PQgetResult(3), and its documentation clarifies that. [1] <https://www.postgresql.org/docs/current/libpq-async.html#LIBPQ-PQGETRESULT> Previous Comments: ------------------------------------------------------------------------ [2020-02-10 14:01:29] mikko dot rantalainen at peda dot net Description: ------------ --- From manual page: https://php.net/function.pg-get-result --- The documentation makes reader to believe that this function is asyncronous. For example: "pg_get_result — Get asynchronous query result" "pg_get_result() gets the result resource from an asynchronous query executed by ..." However, in reality the behavior of pg_get_result() appears to be that it will wait for the query to complete before returning if the query has not yet been fully processed. As such, the function pg_get_result() is syncronous but it is used to get results from an asyncronous function. In addition, the description is unclear about if the expected style is to always repeatedly call pg_get_result() until FALSE is returned. Another way to use this method is call this exactly once for each pg_send_query() that is supposed to contain one query. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79253&edit=1

« previous php.doc.bugs (#19174) next »