Req #78855 [Com]: Native PHP types in database fetches

From: Date: Fri, 22 Nov 2019 11:11:27 +0000
Subject: Req #78855 [Com]: Native PHP types in database fetches
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-223845@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78855&edit=1 ID: 78855 Comment by: fgfgfgfdf at somewhere dot com Reported by: olegxx at gmail dot com Summary: Native PHP types in database fetches Status: Open Type: Feature/Change Request Package: PostgreSQL related Operating System: Linux PHP Version: 7.2.25 Block user comment: N Private report: N New Comment: it's simply wrong add a param to each and every function and just to two can't be serious - how do you imagine to port existing code to that without a ton of errors over the time? besides that another quick shot with mor incosntistences given that myqli has solved that years ago ina proper way if(mysqli_options($this->conn, MYSQLI_OPT_INT_AND_FLOAT_NATIVE, TRUE) === FALSE) { $this->error('mysqli_options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE) failed'); } Previous Comments: ------------------------------------------------------------------------ [2019-11-22 11:03:44] olegxx at gmail dot com Added pull request for the first variant: https://github.com/php/php-src/pull/4939 ------------------------------------------------------------------------ [2019-11-22 10:51:40] olegxx at gmail dot com Description: ------------ PostgreSQL extension should return native PHP types (int, bool, string) from database queries as pdo_pgsql does. To maintain backward compatibility, we can add a new result type flag to pg_fetch_array and pg_fetch_all (e.g. PSQL_TYPED) or create new fetch function. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78855&edit=1

« previous php.bugs (#223845) next »