From e378348a316008822737d47cf47a4938cbc07dd6 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Sun, 9 Mar 2014 14:08:17 +0100 Subject: 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. --- ext/pdo_pgsql/php_pdo_pgsql_int.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/pdo_pgsql/php_pdo_pgsql_int.h') 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 { -- cgit v1.2.1