Commit Graph

12 Commits

Author SHA1 Message Date
Wez Furlong
79f3cb9856 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.
2005-07-20 02:37:57 +00:00
Wez Furlong
529d8177fe Add early support for native prepared statements in pgsql.
Note that some tests now fail; if we can't resolve this in time for the beta,
the prepare code should be disabled (I'll add a flag for this later today).
2005-07-08 15:27:34 +00:00
Edin Kadribasic
7ef1a91508 Fold PQresultErrorField() into a macro 2005-07-01 22:30:55 +00:00
Ilia Alshanetsky
57aa3b984b Removed define checks that break the build. 2005-05-17 20:08:53 +00:00
Wez Furlong
4f778ca31d patch by Christopher Kings-Lynne, slightly modified 2005-05-13 18:09:03 +00:00
Edin Kadribasic
22ff90f7ba Adjust for the new get_col api 2005-02-06 22:48:35 +00:00
Edin Kadribasic
bf77a39349 Decode pgsql LOB objects (bytea type) on fetch 2005-02-05 22:55:23 +00:00
Edin Kadribasic
d8aa131ca0 Store pgsql_type, intval and boolav per column 2005-01-23 10:57:11 +00:00
Wez Furlong
ef0de01b62 Take a blind stab at implementing scrollable cursors for pgsql.
We allocate a unique cursor name for each statement, so that we
don't interfere with other open statement handles on the same dbh.

Note, however, that we force a new transaction for each open scrollable cursor
(postgres requires cursors to be used inside a transaction).  This is okay,
except for the case where a scrollable cursor is opened, an update is made and
the cursor is closed; closing the cursor commits the transaction that was begun
when it was opened.

It might well be better to avoid the transaction in PDO and force the user to
be aware of the requirements of cursors and explicitly initiate the transaction
themselves.

This is all untested code; it compiles and looks like it will work, but I
encourage someone with a real postgres setup to actually sit down and try to
use it.
2005-01-13 01:59:39 +00:00
Ilia Alshanetsky
f8d045619a Last insert id (oids) support. 2004-05-20 18:00:24 +00:00
Ilia Alshanetsky
38eb52b8a7 Make doer() work.
Make error reporting system work.
2004-05-20 17:43:56 +00:00
Edin Kadribasic
9d6c259988 PostgreSQL PDO driver. 2004-05-20 02:27:49 +00:00