-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix #78855: Native PHP types in database fetches #4939
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@oleg-st What about the Postgres types |
Wish this could be done in mysqlnd. It would save lots of headaches, particularly since promoting features with strict typing. |
Added floats. |
@cmb69 PHP-7.4 is freezed for features, isn't it? |
ext/pgsql/tests/bug78855.phpt
Outdated
var_dump(pg_fetch_all($res, PGSQL_NUM|PGSQL_TYPED)); | ||
|
||
?> | ||
--EXPECTF-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be replaced by --EXPECT--
@oleg-st, this feature might be regarded as small and self-contained addition, and as such might be permissible for PHP-7.4. If not, the PR should target master. Anyway, IMO this cannot go into PHP-7.2. which the PR currently targets. |
@oleg-st, you can change the base-branch of this PR. |
Accorting to this PR - php/php-src#4939
According to this PR - php/php-src#4939
Changed base branch to master |
@oleg-st, you also need to rebase onto master, and force push; otherwise CI won't work as expected (especially, AppVeyor). Regarding the actual feature, it might be a good idea to write to the internals mailing list for visibility. |
@cmb69 Rebased |
Added PSQL_TYPED flag for pg_fetch_array and pg_fetch_all functions to return native typed arrays.
Converting to native type is almost the same as in pdo_pgsql.