From 79f3cb9856abe0537f3fbd6004c7e2ed82aaeb84 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Wed, 20 Jul 2005 02:37:57 +0000 Subject: 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. --- ext/pdo_pgsql/php_pdo_pgsql_int.h | 4 ++++ 1 file changed, 4 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 43633f4f63..855c934488 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -84,6 +84,10 @@ extern struct pdo_stmt_methods pgsql_stmt_methods; #define pdo_pgsql_sqlstate(r) (const char *)NULL #endif +enum { + PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT = PDO_ATTR_DRIVER_SPECIFIC, +}; + #endif /* PHP_PDO_PGSQL_INT_H */ /* -- cgit v1.2.1