[GIT-PULLS] [php-src] PR #23471: ext/pdo_pgsql: Fix PDO::CURSOR_SCROLL statements failing under lazy fetching
[email protected] (KentarouTakeda)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <[email protected]> |
Pull Request: https://github.com/php/php-src/pull/23471 Author: KentarouTakeda A statement prepared with `PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL` and lazy fetching (`PDO::ATTR_PREFETCH => 0`) fails at `execute()` with `SQLSTATE[HY000]: General error: 7` and no message. Either option alone works. A cursor does not stream its result, but `S->is_unbuffered` stays set, so `execute()` calls `PQgetResult()` with nothing in flight. The fix clears the flag when the statement has a cursor. The test is David Carlier's, from #23210.