diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-17 12:05:37 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-12-22 15:56:34 +0100 |
commit | caa710037e663fd78f67533b29611183090068b2 (patch) | |
tree | 7acbcdf527eb148899d6cb90e9f2cb233a3ec2ed /ext/pdo_pgsql/php_pdo_pgsql_int.h | |
parent | 57d69b51373bfb1aa5117022c63c93c612e707f6 (diff) | |
download | php-git-caa710037e663fd78f67533b29611183090068b2.tar.gz |
Rewrite PDO result binding
Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.
This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.
This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.
I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)
Diffstat (limited to 'ext/pdo_pgsql/php_pdo_pgsql_int.h')
-rw-r--r-- | ext/pdo_pgsql/php_pdo_pgsql_int.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index 1f5ea30063..b4bc6318e7 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -48,9 +48,7 @@ typedef struct { } pdo_pgsql_db_handle; typedef struct { - zend_long intval; Oid pgsql_type; - zend_bool boolval; } pdo_pgsql_column; typedef struct { |