summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/php_pdo_pgsql_int.h
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2014-03-09 14:08:17 +0100
committerMatteo Beccati <mbeccati@php.net>2014-03-11 23:10:48 +0100
commite378348a316008822737d47cf47a4938cbc07dd6 (patch)
tree5f400db6fec449e140eff0738882ee85bf08295e /ext/pdo_pgsql/php_pdo_pgsql_int.h
parentd72621ab9e8a6cc89fe1005a83c16249fdc02810 (diff)
downloadphp-git-e378348a316008822737d47cf47a4938cbc07dd6.tar.gz
Added new PDO::PGSQL_ATTR_DISABLE_PREPARES that uses PQexecParams
Faster than prepared statements when queries are run once. Slightly slower than PDO::ATTR_EMULATE_PREPARES but without the potential security implications of embedding parameters in the query itself.
Diffstat (limited to 'ext/pdo_pgsql/php_pdo_pgsql_int.h')
-rw-r--r--ext/pdo_pgsql/php_pdo_pgsql_int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h
index 34d89d2078..1fedababd2 100644
--- a/ext/pdo_pgsql/php_pdo_pgsql_int.h
+++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h
@@ -47,6 +47,7 @@ typedef struct {
to keep track of two different attributes having the same effect. */
int emulate_prepares;
int disable_native_prepares; /* deprecated since 5.6 */
+ int disable_prepares;
unsigned int stmt_counter;
} pdo_pgsql_db_handle;
@@ -90,6 +91,7 @@ extern struct pdo_stmt_methods pgsql_stmt_methods;
enum {
PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = PDO_ATTR_DRIVER_SPECIFIC,
+ PDO_PGSQL_ATTR_DISABLE_PREPARES,
};
struct pdo_pgsql_lob_self {