Commit Graph

57 Commits

Author SHA1 Message Date
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Felipe Pena
a88f7fbc3e - Fixed compiler warnings 2008-10-12 15:01:12 +00:00
Felipe Pena
9552f1a573 - Fixed bug #46249 (pdo_pgsql always fill in NULL for empty BLOB)
- Fixed bug #46274 (pdo_pgsql - Segfault when using PDO::ATTR_STRINGIFY_FETCHES and blob)
2008-10-11 19:03:23 +00:00
Ilia Alshanetsky
43bcf759d3 Better fix for bug #44189 2008-02-26 00:13:57 +00:00
Ilia Alshanetsky
3eb387155a Simplify code 2008-01-29 01:17:30 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Ilia Alshanetsky
39f37ce950 Fixed bug #43457 (Prepared statement with incorrect parms doens't
throw exception with pdo_pgsql driver)
2007-12-02 20:58:14 +00:00
Ilia Alshanetsky
204f9e1a74 Adjusted fix for bug #42978 2007-11-20 23:12:17 +00:00
Ilia Alshanetsky
1e0f6fe5bb Separate parm zval. 2007-04-17 15:29:13 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
2d4b8e19e2 Fixed bug #39656 (crash when calling fetch() on a PDO statment object
after closeCursor()).
2006-11-28 16:27:53 +00:00
Ilia Alshanetsky
c7d84b7451 Fixed compiler warnings 2006-11-16 17:33:39 +00:00
Ilia Alshanetsky
2332e4f9fc Fixed bug #37870 (pgo_pgsql tries to de-allocate unused statements).
Fixed bug #36681 (pdo_pgsql driver incorrectly ignored some errors).
Fixed test for bug #38253 not to use faulty SQL that generates errors in
PostgreSQL
2006-09-19 15:45:22 +00:00
Ilia Alshanetsky
7f52671781 Fixed bug #38168 (Crash in pdo_pgsql on missing bound parameters). 2006-08-01 16:31:29 +00:00
Ilia Alshanetsky
79ebfe382b Fixed memory leaks when working with cursors in PDO PostgreSQL driver. 2006-05-08 14:33:00 +00:00
Wez Furlong
fb7d5bd780 The fix for #35332 caused #35671 (and thus PECL #6504).
Partially back out that fix and introduce an extra optional step for drivers to
canonicalize the "name" that is used for registering parameters.
2006-03-27 20:51:01 +00:00
Antony Dovgal
7731dc9421 fix #36727 (segfault in pdo_pgsql bindValue() when no parameters are defined) 2006-03-17 22:15:57 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Ilia Alshanetsky
f7276af1c6 Fixed compiler warning 2005-12-17 18:26:15 +00:00
Ilia Alshanetsky
c2ed71a879 Retry on failed prepare resulting from duplicate statement name. 2005-12-17 17:59:05 +00:00
Ilia Alshanetsky
4e03ce9fc5 Fixed memory leaks 2005-12-01 16:33:01 +00:00
Ilia Alshanetsky
911355bee8 Fixed memory leak 2005-11-30 23:27:15 +00:00
Wez Furlong
131033352d Added PDO::pgsqlLOBCreate(), PDO::pgsqlLOBOpen() and PDO::pgsqlLOBUnlink(). 2005-11-29 02:11:39 +00:00
Wez Furlong
70331c361e Addresses #35338.
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.
2005-11-25 03:35:04 +00:00
Wez Furlong
6cc5e191d0 Refs #34630 2005-09-24 18:47:50 +00:00
Wez Furlong
edc39221c0 if a php bolean makes it as far as the parameter callback, it must really need
to be boolean; express is as native pgsql 't' or 'f'.

Add a test case for Bug #33876, which is a partially bogus bug.
2005-09-10 21:00:52 +00:00
Edin Kadribasic
38317bb3bd Don't crash on invalid parameter #34203 (Wez) 2005-09-03 23:50:25 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Ilia Alshanetsky
858d827790 Added cursor closer handler.
Fixed memory leak.
2005-07-09 04:54:04 +00:00
Wez Furlong
6ee00c8199 fix leak 2005-07-08 20:45:19 +00:00
Wez Furlong
6377c0ccca Fix PECL #4753 2005-07-08 19:05:57 +00:00
Wez Furlong
512af63a63 rewrite original names to our preferred format 2005-07-08 17:01:20 +00:00
Ilia Alshanetsky
2301d93156 Some of us don't have PostgreSQL 8.0 :) 2005-07-08 16:20:13 +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
Wez Furlong
75cfa5c2e0 probable fix for PECL bug #4546 2005-07-03 03:04:13 +00:00
Edin Kadribasic
7ef1a91508 Fold PQresultErrorField() into a macro 2005-07-01 22:30:55 +00:00
Ilia Alshanetsky
fa0e534f83 Various compiler warning fixes. 2005-05-18 22:40:56 +00:00
Wez Furlong
4f778ca31d patch by Christopher Kings-Lynne, slightly modified 2005-05-13 18:09:03 +00:00
Christopher Kings-Lynne
3e6fce84bb - Use a replacement for PQunescapeBytea so that linking against a pre-7.3
libpq is possible.  This is exactly what ext/pgsql currently does.

# I hope this is an acceptable improvement.
2005-03-23 08:52:40 +00:00
Marcus Boerger
cdb042f632 - Fix fetching bound vars & tests 2005-03-10 18:48:01 +00:00
Edin Kadribasic
2c306869c5 Fixed bug #3478: handling of 64bit return values on 32bit machine 2005-02-15 12:41:24 +00:00
Wez Furlong
af162668e5 fix pointer indirection (and thus leak) 2005-02-07 00:04:20 +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
95cc208464 Removed unused variebles.
Return OID as int.
2005-02-05 20:38:47 +00:00
Edin Kadribasic
1a962e9d98 Get OID of the last inserted row 2005-02-04 01:48:01 +00:00
Edin Kadribasic
60f5e66aa9 Add support for fetching meta data 2005-01-23 14:50:06 +00:00
Edin Kadribasic
d8aa131ca0 Store pgsql_type, intval and boolav per column 2005-01-23 10:57:11 +00:00
Edin Kadribasic
902c2b43cb Remove debug stuff 2005-01-22 23:51:09 +00:00
Edin Kadribasic
e58a8671a2 Support for native nulls, bools and ints 2005-01-22 23:31:19 +00:00