summaryrefslogtreecommitdiff
path: root/ext/pdo_pgsql/pgsql_driver.c
Commit message (Collapse)AuthorAgeFilesLines
* Fixed memory leaksIlia Alshanetsky2005-12-011-1/+1
|
* Fixed memory leakIlia Alshanetsky2005-11-301-1/+1
|
* Fixed compiler warningsIlia Alshanetsky2005-11-291-3/+1
|
* proto fixupsWez Furlong2005-11-291-14/+21
|
* Added PDO::pgsqlLOBCreate(), PDO::pgsqlLOBOpen() and PDO::pgsqlLOBUnlink().Wez Furlong2005-11-291-3/+198
|
* Addresses #35338.Wez Furlong2005-11-251-34/+9
| | | | | | | | | | | | | | | | | | | | | | | Postgres client API is pretty poor, so we have zero idea about the actual parameter types in a statement. We now defer the preparation of a statement until the first call to execute is made. At that point, we have the parameters defined by the calling script, so we can use the typing specified there when we perform the prepare. For PDO_PARAM_LOB parameters, we set the binary formatting flag. We can't just set this flag for all parameters, because its meaning is not "string data, counted length" but "data is in native format". If this flag is set for a numeric column and we send the number 1 formatted as a string, then we will get an "insufficient data left in message" error message, because the library was expecting sizeof(int4) bytes but only saw 1 byte for "1". This is infuriating because we have no way to determine the datatypes for parameters, and the type we explicitly set has to match the type in the database. The only choice we're left with is telling postgres to deduce the type; we still have no idea what type was deduced.
* - Bumber up yearfoobar2005-08-031-1/+1
|
* Add PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT attribute, which, when setWez Furlong2005-07-201-46/+49
| | | | | | | | | | | | | | | | 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.
* Added cursor closer handler.Ilia Alshanetsky2005-07-091-0/+2
| | | | | Fixed memory leak.
* Add early support for native prepared statements in pgsql.Wez Furlong2005-07-081-1/+59
| | | | | | 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).
* Use PQexecParams() when available, use original case in all other instances.Ilia Alshanetsky2005-07-071-3/+13
|
* Leave it up to the user to decide if to escape the sequence name or not.Ilia Alshanetsky2005-07-071-5/+0
|
* Faster sequence id retrieval.Ilia Alshanetsky2005-07-071-6/+7
|
* Only check for InvalidOid when not looking up a sequenceEdin Kadribasic2005-07-011-4/+3
|
* Fold PQresultErrorField() into a macroEdin Kadribasic2005-07-011-12/+2
|
* Added support for fetching current value of a sequence when theEdin Kadribasic2005-07-011-3/+32
| | | | | optional sequence name has been passed to PDO::lastInsertId()
* Silence warnings.Ilia Alshanetsky2005-06-301-1/+1
|
* Make exec() return FALSE on error as do other drivers.Ilia Alshanetsky2005-06-281-2/+2
|
* Fixed double-free bug.Ilia Alshanetsky2005-06-281-1/+0
|
* fixed oid retrieval.Ilia Alshanetsky2005-06-281-1/+1
|
* Various compiler warning fixes.Ilia Alshanetsky2005-05-181-1/+1
|
* patch by Christopher Kings-Lynne, slightly modifiedWez Furlong2005-05-131-8/+15
|
* Alan: moved your fields away, but reserved you a pointer.Wez Furlong2005-02-261-3/+7
| | | | | | | | | | | | | Changed PDO::lastInsertId() to have following proto: string PDO::lastInsertId([string name]) this allows arbitrary unique identitifers to be returned from the driver. The optional name parameter is for databases that require additional contextual information to be able to return the correct identifier. None currently use it, but pgsql will be on the list of drivers that do.
* - Shutup noticesMarcus Boerger2005-02-201-0/+8
|
* Simplify code and fix compiler warning.Ilia Alshanetsky2005-02-121-5/+2
|
* Finalized pgsql LOB support using native pgsql bytea type.Edin Kadribasic2005-02-061-6/+22
| | | | | | | | If paramater is bound with type PDO_PARAM_LOB the quoter function gets a hint that specific LOB type quoting should be used: $stmt->bindParam(":lob", $lob, PDO_PARAM_LOB);
* Decode pgsql LOB objects (bytea type) on fetchEdin Kadribasic2005-02-051-1/+1
|
* Use the created connection string.Ilia Alshanetsky2005-02-031-1/+1
|
* Add support for fetching meta dataEdin Kadribasic2005-01-231-2/+3
|
* Eliminate unused parameter.Wez Furlong2005-01-211-8/+1
| | | | | | Don't start a transaction when asking for a cursor with pgsql. Fix parameter binding for sqlite3
* Allow drivers to select bind emulation on a per statement basisWez Furlong2005-01-181-1/+1
|
* Use PQescapeBytea() for quoting. Need to think how to add binary safeEdin Kadribasic2005-01-171-11/+5
| | | | | | quoting for blobls (pgsql bytea type). Fixes #2818
* Take a blind stab at implementing scrollable cursors for pgsql.Wez Furlong2005-01-131-2/+20
| | | | | | | | | | | | | | | | | | | | 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.
* lame implementation of SQLSTATE error codesWez Furlong2005-01-071-8/+4
|
* Make handle error messages handle persistent situations better.Ilia Alshanetsky2004-09-231-5/+10
|
* more method table adjustments.Wez Furlong2004-09-231-1/+2
| | | | | | mysql driver needs work with the error message stuff. Other drivers need a bit more auditing...
* Proper parameter separators for PostgreSQL connection initialization.Ilia Alshanetsky2004-07-291-4/+13
|
* - Trim error messagesMarcus Boerger2004-07-281-1/+15
|
* - Fix shutdown problemsMarcus Boerger2004-07-281-1/+7
|
* equivalent segv/shutdown fix for failed connectWez Furlong2004-07-281-0/+1
|
* Allow pgsql driver to accept login & password as separate parameters likeIlia Alshanetsky2004-07-201-1/+17
| | | | | other PDO drivers can.
* PQfreemem() is only available in 7.4Edin Kadribasic2004-05-261-1/+1
|
* Whitespace: editor in the wrong mode ;)Edin Kadribasic2004-05-251-4/+4
|
* Add transaction supportEdin Kadribasic2004-05-251-3/+33
|
* Use binary safe function for quotingEdin Kadribasic2004-05-251-5/+11
|
* Fixed memory leak.Ilia Alshanetsky2004-05-251-8/+11
|
* Update for placeholder flagsWez Furlong2004-05-211-3/+1
|
* Kill unused var.Ilia Alshanetsky2004-05-201-1/+0
|
* Fix build on win32Wez Furlong2004-05-201-2/+2
|
* Fixed parameter order.Ilia Alshanetsky2004-05-201-2/+2
|