diff options
author | Wez Furlong <wez@php.net> | 2005-07-20 02:37:57 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-07-20 02:37:57 +0000 |
commit | 79f3cb9856abe0537f3fbd6004c7e2ed82aaeb84 (patch) | |
tree | 58bbf8973b24d53221ac91780ab884ce8c91eed7 /ext/pdo_pgsql/pdo_pgsql.c | |
parent | 9438584d76a6ac7d3bef3535511d3251c6a0ada6 (diff) | |
download | php-git-79f3cb9856abe0537f3fbd6004c7e2ed82aaeb84.tar.gz |
Add PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute, which, when set
to true, forces the driver to use PDO's own emulated prepared statement
support.
Why would you want that, considering that native prepared statements are
supposed to be the best thing ever?
"Often postgresql will have to plan the query without knowing the parameters -
and it will choose a bad plan. In some cases it will plan based on the first
parameters you send. "
Ugh. So now we have a way to let you decide that you know better than the
pgsql query planner.
Diffstat (limited to 'ext/pdo_pgsql/pdo_pgsql.c')
-rw-r--r-- | ext/pdo_pgsql/pdo_pgsql.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index ad2d3fa190..9e57826e0a 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -77,6 +77,7 @@ ZEND_GET_MODULE(pdo_pgsql) PHP_MINIT_FUNCTION(pdo_pgsql) { php_pdo_register_driver(&pdo_pgsql_driver); + REGISTER_LONG_CONSTANT("PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT", PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT, CONST_CS|CONST_PERSISTENT); return SUCCESS; } /* }}} */ |