Commit Graph

167 Commits

Author SHA1 Message Date
Ilia Alshanetsky
fe9db9ab0a Remove pointless PDO_ prefix 2005-09-20 00:44:51 +00:00
Ilia Alshanetsky
bfe844e41e MFH: Make PDO use class constants 2005-09-20 00:35:21 +00:00
Wez Furlong
77d3a41f8a update package.xml files and version numbers, in anticipation of a big bunch of releases. 2005-09-11 05:27:30 +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
Wez Furlong
32cf3cc19f Yes, I can't count the months, and no, I'm not related to Ilia. 2005-07-27 04:07:44 +00:00
Wez Furlong
ba77f8515b prep for PECL release 2005-07-27 02:51:01 +00:00
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
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
4580a7fd8e using new tests 2005-07-07 15:34:46 +00:00
Wez Furlong
b7459aaf7d adopt new tests 2005-07-07 15:20:06 +00:00
Ilia Alshanetsky
6c332449f9 Use PQexecParams() when available, use original case in all other instances. 2005-07-07 13:35:39 +00:00
Ilia Alshanetsky
10e1eecf3f Leave it up to the user to decide if to escape the sequence name or not. 2005-07-07 02:17:20 +00:00
Ilia Alshanetsky
bcb447f6b8 Faster sequence id retrieval. 2005-07-07 00:52:19 +00:00
Wez Furlong
75cfa5c2e0 probable fix for PECL bug #4546 2005-07-03 03:04:13 +00:00
Edin Kadribasic
f05de12fcf Only check for InvalidOid when not looking up a sequence 2005-07-01 22:43:16 +00:00
Edin Kadribasic
7ef1a91508 Fold PQresultErrorField() into a macro 2005-07-01 22:30:55 +00:00
Edin Kadribasic
1a10666b08 Added support for fetching current value of a sequence when the
optional sequence name has been passed to PDO::lastInsertId()
2005-07-01 21:54:50 +00:00
Ilia Alshanetsky
613d30f215 Silence warnings. 2005-06-30 00:07:42 +00:00
Ilia Alshanetsky
8c0dc5e887 Make exec() return FALSE on error as do other drivers. 2005-06-28 14:54:44 +00:00
Ilia Alshanetsky
3fe8b55917 Fixed double-free bug. 2005-06-28 04:03:58 +00:00
Ilia Alshanetsky
f04cbae3fd fixed oid retrieval. 2005-06-28 02:09:53 +00:00
Marcus Boerger
5cf2c9dc45 - Add +ifdefs to still allow PHP 5.0 builds of PDO
# PDO is a PECL extension and at the moment is still meant to compile on
# both PHP 5.0 and PHP 5.1.
2005-06-23 00:19:16 +00:00
Ilia Alshanetsky
c594f47f76 Fixed test skip conditions.
# Same needs to be done to odbc, but it seems access is restricted
# for "privileged" folks.
2005-06-21 13:42:23 +00:00
foobar
15cf2a60b0 - Added PHP_CHECK_PDO_INCLUDES macro (caches the result) 2005-06-14 00:00:53 +00:00
foobar
a20383ba06 - Unify the "configure --help" texts 2005-05-29 23:17:16 +00:00
Marcus Boerger
9b3929a7e9 - Need to make PDO::__construct() final to prevent SEGV it isn't called 1st 2005-05-26 18:36:18 +00:00
Marcus Boerger
2ac0540323 - Add test for deriving PDO 2005-05-24 14:26:22 +00:00
Marcus Boerger
88157ad284 - Add new tests for PDO_FETCH_INTO 2005-05-24 12:39:09 +00:00
Ilia Alshanetsky
fa0e534f83 Various compiler warning fixes. 2005-05-18 22:40:56 +00:00
Ilia Alshanetsky
57aa3b984b Removed define checks that break the build. 2005-05-17 20:08:53 +00:00
Edin Kadribasic
9af73f68ef Sync with config.m4 2005-05-16 17:34:44 +00:00
Wez Furlong
4f778ca31d patch by Christopher Kings-Lynne, slightly modified 2005-05-13 18:09:03 +00:00
foobar
0e57528666 No c++ comments in C code 2005-04-19 11:41:04 +00:00
Marcus Boerger
2906d6570c - Add new test 2005-03-24 12:31:37 +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
a66e14645c - Add new tests 2005-03-21 00:29:25 +00:00
Marcus Boerger
360fbc09b7 - Interface name was changed 2005-03-19 10:55:35 +00:00
Marcus Boerger
7c4cd04229 - Update tests 2005-03-13 22:35:34 +00:00
Marcus Boerger
cdb042f632 - Fix fetching bound vars & tests 2005-03-10 18:48:01 +00:00
Marcus Boerger
92af2b6194 - Update tests 2005-03-10 17:55:36 +00:00
Marcus Boerger
1b93629fb8 - Fix test name 2005-03-10 15:54:52 +00:00
Magnus M��tt�
0844446176 More tests. 2005-03-09 21:02:31 +00:00
Marcus Boerger
bbccc37f84 - Add new tests 2005-03-07 22:43:27 +00:00
Marcus Boerger
efb3529b7f - Add new tests 2005-03-07 22:36:12 +00:00
Marcus Boerger
7bbbfa3f15 - Add new tests 2005-03-07 01:39:12 +00:00
Marcus Boerger
f76f510185 - Add tests
- Fix testname
- Drop unnecessary include line (was wrong anyway)
2005-03-04 01:29:27 +00:00
Rasmus Lerdorf
99f832a206 If pdo is disabled, skip all the pdo extensions. 2005-02-28 08:18:47 +00:00
Marcus Boerger
d0a76e992b - Add new test 2005-02-27 22:39:35 +00:00
Wez Furlong
2c5b2fc105 Alan: moved your fields away, but reserved you a pointer.
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.
2005-02-26 17:27:51 +00:00
Marcus Boerger
b89fda667f - Drop driver name from generic tests and reserve those names for driver
specific tests.
# Well a little design correction
2005-02-24 00:11:16 +00:00
Marcus Boerger
b786b93b7a - Delay ctor call so that it can overwrite everything and the data can
already be accessed from the ctor.
2005-02-23 23:28:30 +00:00
Marcus Boerger
3f1738f96d - Add new tests 2005-02-23 01:13:13 +00:00
Marcus Boerger
3cb441df9a - Add new tests 2005-02-23 00:56:34 +00:00
Marcus Boerger
ab8f1f316b - Add new test 2005-02-21 18:55:51 +00:00
Marcus Boerger
74b1cee57f - Show warnings 2005-02-21 18:54:45 +00:00
Marcus Boerger
a455c7abcb - Shutup notices 2005-02-20 19:26:27 +00:00
Marcus Boerger
5a48f0ec38 - Add tests 2005-02-20 19:26:05 +00:00
Wez Furlong
55f53a5a96 symlinked pdo drivers under ext.
Enabled PDO and PDO_SQLITE by default.
Fixup PDO header detection so that it searches in the correct order, and
correctly picks up the headers when building from outside of the source
tree.

TODO: make pdo_XXX auto-enable when XXX is enabled.  Volunteers welcome.
2005-02-17 04:23:15 +00:00
Edin Kadribasic
2c306869c5 Fixed bug #3478: handling of 64bit return values on 32bit machine 2005-02-15 12:41:24 +00:00
Hartmut Holzgraefe
1f98a966c5 fix aclocal "underquoted argument" warnings 2005-02-13 07:31:02 +00:00
Ilia Alshanetsky
9b394af973 Simplify code and fix compiler warning. 2005-02-12 20:55:28 +00:00
Wez Furlong
c28a0b9fcb disable dep 2005-02-09 05:18:02 +00:00
Wez Furlong
201ec3dc02 prep for release 2005-02-09 05:04:40 +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
accdde8c19 Finalized pgsql LOB support using native pgsql bytea type.
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);
2005-02-06 01:27:27 +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
Ilia Alshanetsky
996b464e30 Use the created connection string. 2005-02-03 22:24:50 +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
Wez Furlong
26f97a911b Eliminate unused parameter.
Don't start a transaction when asking for a cursor with pgsql.
Fix parameter binding for sqlite3
2005-01-21 00:39:03 +00:00
Wez Furlong
a9d98544de Allow drivers to select bind emulation on a per statement basis 2005-01-18 04:58:50 +00:00
Edin Kadribasic
095a6f1eb3 Use PQescapeBytea() for quoting. Need to think how to add binary safe
quoting for blobls (pgsql bytea type).
Fixes #2818
2005-01-17 10:37:41 +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
Wez Furlong
0db373883f detect funky kerberos deps that chain on from openssl deps on RH distros 2005-01-13 01:12:34 +00:00
Wez Furlong
d3ab27f7cc stub out scrollable cursors 2005-01-12 06:11:33 +00:00
Wez Furlong
02d6b65c67 lame implementation of SQLSTATE error codes 2005-01-07 05:25:57 +00:00
Ilia Alshanetsky
1fc2b79172 Make handle error messages handle persistent situations better. 2004-09-23 21:15:51 +00:00
Wez Furlong
72040f7f2a more method table adjustments.
mysql driver needs work with the error message stuff.
Other drivers need a bit more auditing...
2004-09-23 20:43:11 +00:00
Marcus Boerger
3bca709fbc Add missing module deps 2004-08-11 21:04:36 +00:00
Ilia Alshanetsky
65ae35729d Proper parameter separators for PostgreSQL connection initialization. 2004-07-29 00:18:02 +00:00
Marcus Boerger
0b40c1d82b - Trim error messages 2004-07-28 00:51:48 +00:00
Marcus Boerger
7557b388de - Fix shutdown problems 2004-07-28 00:40:01 +00:00
Wez Furlong
d5923d9121 equivalent segv/shutdown fix for failed connect 2004-07-28 00:15:19 +00:00
Ilia Alshanetsky
0d085b253f Allow pgsql driver to accept login & password as separate parameters like
other PDO drivers can.
2004-07-20 00:33:21 +00:00
Edin Kadribasic
9cc4fb18b6 PQfreemem() is only available in 7.4 2004-05-26 17:45:03 +00:00
Edin Kadribasic
c7a2cf7385 Whitespace: editor in the wrong mode ;) 2004-05-25 17:38:58 +00:00
Edin Kadribasic
16a53a00ea Add transaction support 2004-05-25 17:36:22 +00:00
Edin Kadribasic
ff1cbb8460 Use binary safe function for quoting 2004-05-25 16:24:29 +00:00