php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #79253 doc for pg_get_result() fails to mention its implementation is syncronous
Submitted: 2020-02-10 14:01 UTC Modified: -
From: mikko dot rantalainen at peda dot net Assigned:
Status: Open Package: Documentation problem
PHP Version: 7.4.2 OS: Ubuntu Linux 16.04 LTS
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-02-10 14:01 UTC] 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.



Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 24 21:01:24 2020 UTC