diff --git a/code/PostgreSQLQuery.php b/code/PostgreSQLQuery.php index 2225918..2b35a6b 100644 --- a/code/PostgreSQLQuery.php +++ b/code/PostgreSQLQuery.php @@ -58,6 +58,7 @@ class PostgreSQLQuery extends Query public function getIterator() { + pg_result_seek($this->handle, 0); while ($data = $this->nextRecord()) { yield $data; } diff --git a/composer.json b/composer.json index 23675f1..b9ca9ac 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ } ], "require": { + "ext-pgsql": "*", "silverstripe/framework": "^5", "silverstripe/vendor-plugin": "^1.0" },