Does the PHP function pg_fetch_assoc() internally
use an Iterator / Cursor, or does it get all data at once, network-wise?
Would \PDO be using a Cursor?
My context is fetching a large amount of data and I want to know if it gets pulled as a whole or row by row (or limited rows by rows when the cursor holds a subset of the full dataset).
The data is passed via $result:
(Taken from the
pgsql.phpfile that opens (CTRL + Clickon function name in PHPStorm)):The rows in
$resultis a numbered array/object, containing all data it has. It simply returns the row in that array/object, so it deals with whatever data is in the passed cursor. We can get this from one of the lines from the above code (formatted for better reading):