Commit Graph

802 Commits

Author SHA1 Message Date
Pierre Joye
9805e1674a - remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ 2011-07-22 11:25:30 +00:00
Felipe Pena
32b5f8a1a3 - Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00
Ilia Alshanetsky
46ff954ca7 Added support for "extra" parameter for PGNotify(). 2011-01-27 16:02:30 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Pierre Joye
ce96fd6b07 - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus 2010-11-18 15:22:22 +00:00
Felipe Pena
996f45b688 - Fixed bug #47199 (pg_delete() fails on NULL)
patch by: ewgraf at gmail dot com
2010-11-06 17:43:25 +00:00
Felipe Pena
ccfe9c30aa - Fixed bug #47199 (pg_delete() fails on NULL)
patch by: ewgraf at gmail dot com
2010-11-06 17:43:25 +00:00
Pierre Joye
aa0ed267a2 - use TSRMLS_*C instead of TSRMLS_FETCH in zend_list_insert 2010-09-16 09:13:19 +00:00
Raphael Geissert
174d2528b1 Fix typos s/connnection/connection 2010-05-01 18:27:42 +00:00
Raphael Geissert
59fa776c53 Fix typos s/connnection/connection 2010-05-01 18:27:42 +00:00
Rob Richards
0a34d10783 revert change #298288: Remove old dsp/dsw/makefile files 2010-04-28 14:41:51 +00:00
Kalle Sommer Nielsen
dd8e59da8f Removed safe_mode
* Removed ini options, safe_mode*
 * Removed --enable-safe-mode --with-exec-dir configure options on Unix
 * Updated extensions, SAPI's and core
 * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
2010-04-26 23:53:30 +00:00
Kalle Sommer Nielsen
518a17e7bf Remove old dsp/dsw/makefile files, these arent used by the build system anymore and are barely updated nor available for all extensions 2010-04-21 23:36:49 +00:00
Felipe Pena
1efc049863 - Fixed bug #51607 (pg_copy_from does not allow schema in the tablename argument)
Patch by: cbandy at jbandy dot com
2010-04-20 15:59:01 +00:00
Felipe Pena
b7bd1167a9 - Fixed bug #51607 (pg_copy_from does not allow schema in the tablename argument)
Patch by: cbandy at jbandy dot com
2010-04-20 15:59:01 +00:00
Felipe Pena
5aedea7179 - Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter) 2010-04-20 14:11:53 +00:00
Felipe Pena
8c14acfc82 - Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter) 2010-04-20 14:11:53 +00:00
Felipe Pena
0b401e1289 - Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string literal)
Patch by: cbandy at jbandy dot com
2010-04-20 11:49:23 +00:00
Felipe Pena
f507cc9cf6 - Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string literal)
Patch by: cbandy at jbandy dot com
2010-04-20 11:49:23 +00:00
Hannes Magnusson
3f15f8f4e3 Fix build (see r296062) 2010-03-11 19:50:04 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Matteo Beccati
166b3ef63d Removed spurious high-ascii char from previous commmit 2009-12-25 21:01:06 +00:00
Matteo Beccati
09587d3cbf - Updated ext/pgsql tests to work w/ PostgreSQL 8.5
# tested w/ 8.5alpha3
2009-12-25 20:56:00 +00:00
Ilia Alshanetsky
eae259b7ea Fixe build 2009-11-27 03:02:01 +00:00
Ilia Alshanetsky
23f4da9113 Fixed bug #50195 (pg_copy_to() fails when table name contains schema). 2009-11-25 14:28:00 +00:00
Ilia Alshanetsky
03ddb4f2b5 Fixed compiler warnings 2009-11-02 13:33:24 +00:00
Kalle Sommer Nielsen
01fc4ed1d6 MFH: Fix compiler warnings 2009-05-19 16:03:36 +00:00
Pierre Joye
dff4655e31 - MFH: define HAVE_PQPROTOCOLVERSION and HAVE_PG_LO_CREATE (Tim Starling) 2009-05-11 10:44:12 +00:00
Ilia Alshanetsky
309533842f MFB: ext/pgsql/tests/80_bug14383.phpt 2009-04-06 14:23:07 +00:00
Ilia Alshanetsky
8610935eac Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string
literal)
2009-03-12 22:53:16 +00:00
Pierre Joye
cb95e1e709 - add path for libpq (other are kept) 2009-03-09 17:52:51 +00:00
Felipe Pena
d295d9113e - MFH: Fix test 2009-01-30 14:50:05 +00:00
Felipe Pena
e77326faba - MFH: Fixed bug #47048 (Segfault with new pg_meta_data) 2009-01-18 23:49:31 +00:00
Ilia Alshanetsky
dfa86ccf73 Improved parameter handling 2009-01-13 19:08:08 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Dmitry Stogov
7d4fd3fd38 Fixed bug #46409 (__invoke method called outside of object context when using array_map) 2008-11-27 19:01:23 +00:00
Felipe Pena
fc2fb50d09 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-11-17 11:28:01 +00:00
Felipe Pena
7a37fa2d6b - Revert ZEND_BEGIN_ARG_INFO change 2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563 - MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro 2008-10-24 14:35:40 +00:00
Felipe Pena
8563497a94 MFH:
- Fixed:
  . Memory leak in pg_delete() when using PGSQL_DML_STRING.
  . Bug #24679 (pg_insert problem!)
  . Bug #35996 (pg_meta_data should take the schema into account)
  . Bug #40808 (pg_insert problem)
  . Bug #42078 (pg_meta_data mix tables metadata from different schemas)
- Improved:
  . Error messages
- Added:
  . Tests
2008-10-16 00:39:31 +00:00
Felipe Pena
30173a8ec8 - Fixed possible efree(NULL) 2008-10-15 13:34:26 +00:00
Felipe Pena
310ac30e5a MFH:
- Fixed bug #37100 (data is returned truncated with BINARY CURSOR)
  Patch by Tony
2008-10-13 13:44:32 +00:00
Ilia Alshanetsky
529105427e use proper macro 2008-10-08 23:04:38 +00:00
Ilia Alshanetsky
fdcdf8c02b Fixed bug #46206 (pg_query_params/pg_execute convert passed values to
strings).
2008-10-01 20:30:23 +00:00
Ilia Alshanetsky
b3bbaf7d06 Fixed unused var warning 2008-09-10 01:39:35 +00:00
Felipe Pena
0c745885ca - Fixed some wrong format parameters 2008-09-08 01:33:08 +00:00
Jani Taskinen
b17dc14f18 MFH: nuketh C++ comments 2008-08-03 12:15:55 +00:00
Dmitry Stogov
691d4a6999 Fixed uninitialised data 2008-07-25 08:23:07 +00:00
Hartmut Holzgraefe
54981e8c2e MFH: corrected library search path order in tests 2008-07-23 21:44:25 +00:00
Hartmut Holzgraefe
6fcc0ec369 splitted test cases for lo_create and lo_import, added version aware
SKIP tests
2008-07-23 09:06:59 +00:00
Hartmut Holzgraefe
432b57b2ae added support for object ids in pg_lo_create() and pg_lo_import() where available
(based on code provided by Tatsuo Ishii)
2008-07-23 00:17:19 +00:00
Felipe Pena
01a35a058f - Added arginfo 2008-07-02 00:10:54 +00:00
Felipe Pena
4fe93ca55d - Fixed test 2008-06-30 01:23:30 +00:00
Felipe Pena
69e3fc8782 - New parameter parsing API 2008-06-29 22:38:55 +00:00
Ilia Alshanetsky
01da46b1bb Fixed bug #45004 (pg_insert() does not accept 4 digit timezone format) 2008-05-19 15:16:47 +00:00
Dmitry Stogov
240fa244c3 Improved PHP binary size and startup speed with GCC4 visibility control (Nuno) 2008-01-30 09:41:12 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Ilia Alshanetsky
969f81a49e Fixed bug #43041 (micro-optimizations in pgsql data retrieval) Initial patch
by andy at petdance dot com
2007-11-22 00:17:28 +00:00
Ilia Alshanetsky
37b3d701e3 Fixed bug #43279 (pg_send_query_params() converts all elements in 'params'
to strings)
2007-11-13 20:05:47 +00:00
Jani Taskinen
aa3eee1dce MFH:- Moved the old regex functions to own extension: ereg 2007-10-05 15:00:09 +00:00
Ilia Alshanetsky
f6b761b0ac Fixed bug #42783 (pg_insert() does not accept an empty list for insertion) 2007-10-03 23:30:46 +00:00
Dmitry Stogov
6c810b0d4c Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:00:48 +00:00
Ilia Alshanetsky
49c91f6e33 MFH: fixed typo in function name 2007-09-05 13:03:59 +00:00
Ilia Alshanetsky
59a410cb76 Fixed bug #42506 (php_pgsql_convert() timezone parse bug) 2007-09-03 15:36:04 +00:00
Ilia Alshanetsky
f30f2ef733 Fixed bug #42368 (Incorrect error message displayed by pg_escape_string). 2007-08-22 22:40:29 +00:00
Jani Taskinen
0261432888 MFH 2007-07-11 21:51:55 +00:00
Ilia Alshanetsky
adcfdf7fa4 Fixed bug #41845 (pgsql extension does not compile with PostgreSQL <7.4) 2007-07-02 15:37:43 +00:00
Antony Dovgal
1f65545121 fix test names 2007-05-07 18:03:01 +00:00
Marcus Boerger
50ea26760d - Avoid sprintf, even when checked copy'n'paste or changes lead to errors 2007-02-24 02:17:47 +00:00
Ilia Alshanetsky
a471f75354 Simplify code by converting emalloc() + sprintf() to spprintf() 2007-02-23 00:37:36 +00:00
Edin Kadribasic
f31b3b497d Fixed bug #40371 2007-02-19 17:26:15 +00:00
Ilia Alshanetsky
7605d10252 PQfreemem checks 2007-02-18 17:05:53 +00:00
Antony Dovgal
870bd0b99f MFH 2007-01-11 16:45:37 +00:00
Ilia Alshanetsky
5babb6d10d Fixed bug #39979 (PGSQL_CONNECT_FORCE_NEW will causes next connect to
establish a new connection).
2007-01-07 04:36:40 +00:00
Ilia Alshanetsky
7d901eacbe %f -> %F 2007-01-05 15:06:55 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Ilia Alshanetsky
79d524dc1e Fixed bug #39971 (pg_insert/pg_update do not allow now() to be used for
timestamp fields).
2006-12-29 00:34:30 +00:00
Ilia Alshanetsky
794845234e Added buffer length checks 2006-12-28 15:21:21 +00:00
Ilia Alshanetsky
52d53543ac Allocation safety checks 2006-12-25 22:36:57 +00:00
Hannes Magnusson
f4e63cbece Fix test 2006-12-12 09:15:25 +00:00
Ilia Alshanetsky
bfa4af46e1 Fixed bug #39663 (Memory leak in pg_get_notify() and a possible memory
corruption on Windows in pgsql and pdo_pgsql extensions).
2006-11-29 15:45:59 +00:00
Ilia Alshanetsky
b28cbe8b6f Fixed bug #36812 (pg_execute() modifies input array). 2006-11-13 22:10:37 +00:00
Edin Kadribasic
9f5de3bb5c Sync with Unix build 2006-10-11 11:00:03 +00:00
Ilia Alshanetsky
fab29dcbcf Make pg_escape_bytea() use PQescapeByteaConn() whenever possible. 2006-10-06 21:45:10 +00:00
Hannes Magnusson
93909bb30e - nuke unused variable
- "prefer" two arguments
- only print "wrong parameter count" once
2006-10-05 16:02:29 +00:00
Edin Kadribasic
a290cef01c Added PQescapeStringConn support to windows too 2006-10-05 11:13:31 +00:00
Ilia Alshanetsky
e8c70bfa99 Added support for character sets in pg_escape_string() for PostgreSQL
8.1.4 and higher.
2006-10-04 23:27:03 +00:00
Hannes Magnusson
9bff1e24b5 pg_send_prepare(), pg_send_query_params() & pg_send_execute() do not throw "Wrong parameter count" 2006-10-03 15:21:47 +00:00
Ilia Alshanetsky
2cc1f53f3b Added a check for PQftable() function 2006-09-15 19:47:50 +00:00
Antony Dovgal
37635d93e6 fix leak in pg_copy_to() when invalid resource was passed 2006-09-06 12:40:56 +00:00
Dmitry Stogov
1dbaae2795 Added automatic module globals management 2006-06-15 18:33:09 +00:00
Marcus Boerger
77c1b56cd7 - Update after api changes 2006-05-10 00:00:13 +00:00
Edin Kadribasic
18eb480dd2 MFH: Added pg_field_table() as per req: #36750 2006-05-07 00:28:32 +00:00
Marcus Boerger
8bbf3a00dc - MFH Fix potenbtioal SEGV 2006-04-10 19:51:55 +00:00
Yasuo Ohgaki
cdbe8b4fd8 reenable pg_execute E_WARNING 2006-03-28 00:28:02 +00:00
Yasuo Ohgaki
82376269fd remove pg_execute() E_WARNING error when query plan is not defined 2006-03-27 02:59:55 +00:00
Marcus Boerger
0bcd459300 - bug #36625 fix 2006-03-13 22:56:20 +00:00
Antony Dovgal
0b12f7307e MFH: fix #36606 (pg_query_params() changes arguments type to string) 2006-03-05 13:35:52 +00:00
foobar
8c56ee5cb6 MFH: - Fixed bug #35911 (HAVE_PG_CONFIG_H set incorrectly) 2006-01-05 21:53:19 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
Marcus Boerger
8479546920 - MFH Fix tests 2005-12-31 17:42:39 +00:00
Marcus Boerger
81c25d8700 - Get rid of compiler warnings (both postgres an dphp use these defines) 2005-12-20 21:10:43 +00:00
Ilia Alshanetsky
6654b31e26 fixed test for ZTS 2005-12-18 14:22:48 +00:00
foobar
3e669bc950 MFH: nuke php3 legacy 2005-12-06 02:28:41 +00:00
foobar
a3af52c11e MFH: list_entry -> zend_rsrc_list_entry 2005-12-05 23:38:04 +00:00
Marcus Boerger
ae1d56d098 - MFH Bug #32223 weird behaviour of pg_last_notice 2005-11-07 12:57:49 +00:00
Marcus Boerger
71ad4dd19b - Fix parameter parsing 2005-11-06 11:58:34 +00:00
Ilia Alshanetsky
ea4734926e MFH: Fixed bug #33167 (Possible crash inside pg_fetch_array()). 2005-10-11 16:19:14 +00:00
Marcus Boerger
91682f88e4 - MFH Make test check for PlPgSQL before using it 2005-10-09 15:58:13 +00:00
Marcus Boerger
a8c5828ce0 - MFH Add new test 2005-10-09 15:14:22 +00:00
Edin Kadribasic
d327027ea9 Use free() instead of PQfreemem() to maintain compabitibility with older
PostgreSQL client libraries (bug #33813).
2005-08-16 09:55:44 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
foobar
03897956b2 revert fix that did not fix anything 2005-07-22 22:00:55 +00:00
Yasuo Ohgaki
813bd67320 fix build with older postgresql 2005-07-22 18:48:14 +00:00
Ilia Alshanetsky
ef7bd06657 Added pg_fetch_all_columns() function to fetch all values of a column from
a result cursor.
2005-07-08 00:40:32 +00:00
Edin Kadribasic
312a8eede3 Properly detect when the copy command fails 2005-07-05 14:49:22 +00:00
Derick Rethans
17b877a772 - Fixed memory corruption in pg_copy_from() in case the as_null parameter was
passed. (Derick)
2005-07-05 12:45:39 +00:00
Wez Furlong
e9d474dc01 fixes for #33251 2005-06-05 19:25:01 +00:00
foobar
a20383ba06 - Unify the "configure --help" texts 2005-05-29 23:17:16 +00:00
Antony Dovgal
fcf14f1795 use & and check for the right value of result_type 2005-05-10 23:12:31 +00:00
Antony Dovgal
38a7ef5fe6 fix #32904 (pg_get_notify() ignores result_type parameter) 2005-05-10 20:13:24 +00:00
Ilia Alshanetsky
bdbce01588 Prevent double free. 2005-05-03 22:50:00 +00:00
Antony Dovgal
2c511712f7 disable pg_cmdtuples() too, if there is no pg_affected_rows() 2005-04-13 22:11:35 +00:00
Derick Rethans
cba30657d9 - MFH43: Fixed bug #32699 (pg_affected_rows() was defined when it was not
available).
2005-04-13 21:48:33 +00:00
Antony Dovgal
1c4eb9b684 fix typo 2005-04-03 13:06:08 +00:00
Christopher Kings-Lynne
030ebaaa45 (PHP pg_unescape_bytea) Use libpq version of PQunescapeBytea if it exists.
# The version in libpq is newer and faster than the one in PHP, but it is
# necessary for me to add a string copy for freeing purposes.  This copy
# is only needed in Windows AFAIK, how can I detect that?
2005-03-25 06:26:31 +00:00
Ilia Alshanetsky
e8bd3b9b4f Slightly safer code. 2005-03-25 00:30:43 +00:00
Christopher Kings-Lynne
63ed4a1996 - Ensure that ext/pgsql tests work when linked against 7.2 or lower libpq 2005-03-23 03:24:41 +00:00
Christopher Kings-Lynne
e2b87e6230 Tweak some #if's to be more orthogonal.
(PHP pg_set_error_verbosity) New function to set PostgreSQL error verbosity

(PHP pg_copy_from) Use non-deprecated API if it is available

(PHP pg_copy_to) Use non-deprecated API if it is available
2005-03-22 08:51:23 +00:00
foobar
4d46234912 - Fixed a warning (might also be an error with some exotic compiler) 2005-03-20 02:57:10 +00:00
Christopher Kings-Lynne
721d34bebc Two of the diagnostic definitions were added in 8.0. Add appropriate #ifdefs. 2005-03-20 02:46:02 +00:00
Marcus Boerger
d23781e08d - Add missing skipif part 2005-03-19 10:58:44 +00:00
Christopher Kings-Lynne
3dd44c3018 Another oversight - make sure constants related to pg_result_error_field are #if'd as well as the function itself 2005-03-19 09:21:51 +00:00
Christopher Kings-Lynne
e4570cdbd2 Add regression tests for pg_transaction_status and pg_result_error_field 2005-03-19 09:20:52 +00:00
Christopher Kings-Lynne
28ec3abf87 Minor oversight in #if for an internal function 2005-03-19 09:07:20 +00:00
Christopher Kings-Lynne
1168c30635 Added several new functions to support the PostgreSQL v3 protocol
introduced in PostgreSQL 7.4.

(PHP pg_transaction_status) New function to get in-transaction status of
                            a database connection.

(PHP pg_query_params) New function to allow execution of parameterized
                      queries.

(PHP pg_prepare) New function to allow preparing named queries.

(PHP pg_execute) New function to allow execution of named prepared
                 queries.

(PHP pg_send_query_params) New function that is the async equivalent of
                           pg_query_params.

(PHP pg_send_prepare) New function that is the async equivalent of
                      pg_prepare.

(PHP pg_send_execute) New function that is the async equivalent of
                      pg_execute.

(PHP pg_result_error_field) New function that allows highly detailed
                            error information, most importantly the
                            SQLSTATE error code

# Regression tests are included for all but 2 functions, the rest will
# follow shortly.  Docs will also follow shortly.
2005-03-19 08:46:56 +00:00
Edin Kadribasic
4a133ae725 ws fix 2005-02-14 23:40:24 +00:00
Edin Kadribasic
70e0849416 Added pg_field_type_oid() function 2005-02-14 23:36:16 +00:00
Edin Kadribasic
84a6e90b7d Added missing defines (#31751) 2005-02-14 23:01:57 +00:00
foobar
69eec3f3b9 MFB_4_3: Quote macro names in AC_DEFUN() 2004-12-30 07:08:39 +00:00
Joe Orton
2685ca935f Update extensions to use /path/to/$PHP_LIBDIR rather than /path/to/lib
to support multi-ABI platforms.
2004-11-03 14:32:52 +00:00
Andi Gutmans
56f8195fe5 - Nuke empty_string. It is a reminanent from the time where RETURN_FALSE()
used to return "" and not bool(false). It's not worth keeping it because
  STR_FREE() and zval_dtor() always have to check for it and it slows down
  the general case. In addition, it seems that empty_string has been abused
  quite a lot, and was used not only for setting zval's but generally in
  PHP code instead of "", which wasn't the intention. Last but not least,
  nuking empty_string should improve stability as I doubt every place
  correctly checked if they are not mistakenly erealloc()'ing it or
  calling efree() on it.
  NOTE: Some code is probably broken. Each extension maintainer should
  check and see that my changes are OK. Also, I haven't had time to touch
  PECL yet. Will try and do it tomorrow.
2004-07-19 07:19:50 +00:00
Ilia Alshanetsky
ca5c6a1e91 Fixed bug #28374 (Possible unterminated loop inside
_php_pgsql_trim_message()).
2004-05-12 16:49:47 +00:00
Ilia Alshanetsky
8694cd135d Fixed possible crash inside pg_copy_(to|from) function if delimiter is more
then 1 character long.
2004-04-22 00:31:55 +00:00
Ilia Alshanetsky
5442d722c3 Fixed bug #27300 (Improved regex for pg_convert()).
# Patch by benjcarson at digitaljunkies dot ca
2004-03-18 01:34:58 +00:00
Marcus Boerger
b83663e0f2 Keep BC of pg_fetch_object 2004-03-15 20:16:59 +00:00
Marcus Boerger
0ace9f4885 Bugfix #27597 pg_fetch_array not returning false . 2004-03-15 19:47:18 +00:00
Marcus Boerger
1651be020a Show the connect result 2004-03-09 14:37:49 +00:00
Ard Biesheuvel
81f05c18f5 Wordsize fixes 2004-02-25 20:16:27 +00:00
Zeev Suraski
30171a7590 zend_default_classes.h -> zend_exceptions.h 2004-02-12 10:43:27 +00:00
Ilia Alshanetsky
194509f093 Fixed bug #27007 (missing connection closure when connect fails in pgsql). 2004-01-29 02:54:30 +00:00
foobar
f4983c0d3f - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 2004-01-17 13:00:38 +00:00
Ilia Alshanetsky
3b7da77480 Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option). 2004-01-11 21:18:19 +00:00
Marcus Boerger
b460ae868e Use pg_config if it can be found. 2004-01-09 18:44:33 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Ilia Alshanetsky
fae56fca30 Removed a useless define. 2003-12-29 15:58:01 +00:00
Ilia Alshanetsky
20d64aa24e Make test work with PostgreSQL 7.4 2003-12-23 17:33:06 +00:00
Ilia Alshanetsky
57b7eb9dc3 Missing bit for bug #26625. 2003-12-22 15:56:51 +00:00
Ilia Alshanetsky
82ec523a75 Fixed Bug #26625 (pg_convert sets NULL incorrectly for character data
types).
2003-12-16 01:00:34 +00:00
Edin Kadribasic
c7ad4d1e4d MFB: Use standard header locations 2003-12-11 11:19:15 +00:00
Ilia Alshanetsky
669b421c11 Removed unused variable. 2003-12-07 18:39:09 +00:00
Marcus Boerger
4b9a4509c4 MFB: PHP_PQ_ERROR() change 2003-12-06 21:36:21 +00:00
Marcus Boerger
37bcfda978 #args, reinsert skipif for extension check 2003-12-06 20:41:07 +00:00
Marcus Boerger
4a66bd9394 Do not dynamically load the extension in skipif 2003-12-06 20:35:41 +00:00
Edin Kadribasic
32eb4f78c2 Get rid of PHPAPI usage.
Enable shared build in the new php5 build system
Check for the correct header.
2003-12-05 01:03:35 +00:00
Wez Furlong
9555db802d Make this build using new build system 2003-12-04 15:32:31 +00:00
Marcus Boerger
f6239c33bc Modify pg_fetch_object() to be able to instantiate a selected class and pass
parameters to the constructor. Update tests and add a test for these features.
2003-09-06 18:34:55 +00:00
Marcus Boerger
5d1dbdbfd2 Bugfix #25404 2003-09-06 15:30:28 +00:00
Marcus Boerger
d2f39fc11e format string fix and number of arguments 2003-08-28 23:04:27 +00:00
Andrey Hristov
189e2d8862 this is the right parameter 2003-08-28 21:06:44 +00:00
Andrey Hristov
b2eb454171 format string fixes 2003-08-28 21:00:24 +00:00
Ilia Alshanetsky
bf82857475 Fixed bug #25109 (Possible crash when fetching field name) 2003-08-28 00:31:36 +00:00
Ilia Alshanetsky
e5879a5060 Fixed tests that failed in ZTS due to incorrect file paths.
Fixed test that failed due to new array dimension property being fetched.
2003-08-28 00:29:44 +00:00
Ilia Alshanetsky
249e8d5fa8 Fixed bug #22243 (make pg_meta_data fetch array dimentions)
m-lesser[at]better-com.de
2003-08-27 00:04:19 +00:00
Ilia Alshanetsky
38a98c55f7 Fixed bug #25093 (Various leaks due to non-freed queries) 2003-08-14 17:49:08 +00:00
Marcus Boerger
b156ac9703 #damn 2003-07-27 17:44:20 +00:00
Marcus Boerger
dbc6519b1a In protocol version < 3 we cannot test transaction status and do unconditional ROLLBACK; 2003-07-27 17:05:56 +00:00
Marcus Boerger
f5f60e6fea Added new function pg_parameter_status() 2003-07-27 16:47:36 +00:00
Marcus Boerger
ab36d72c16 Needed function detection 2003-07-27 16:46:40 +00:00
Marcus Boerger
e5d492a3df New smart connect/shutdown for persistent connections.
Behavior for old libs/servers is "BEGIN;ROLLBACK;" in request shutdown.
For new libs a "RESET ALL;" is done in connect and "ROLLBACK;" is only done
where appropriate.
2003-07-27 16:45:10 +00:00
Marcus Boerger
7a85edd370 Added pg_version() which returns an associative array of client/protocol/server
version.
@Added pg_version() function. (Marcus)
2003-07-22 23:05:17 +00:00
Marcus Boerger
ec9ae45e2f Add reson 2003-07-22 23:01:24 +00:00
Marcus Boerger
bc90ce7818 The value might be a null pointer 2003-07-22 22:05:46 +00:00
Marcus Boerger
dd781dcdc9 Postgres decision on this 2003-07-22 21:12:32 +00:00
Marcus Boerger
6175f0a4c9 Reset vars when reusing a persistent connection as requested from postgres developers 2003-07-21 20:53:00 +00:00
Marcus Boerger
c89ade3b66 Go without #24499 hint sneaked in by accident 2003-07-21 20:49:47 +00:00
Marcus Boerger
db86597e88 Add test for bug #24499 2003-07-20 20:27:43 +00:00
Marcus Boerger
c766e9a503 Use only one line per error message and don't terminate with a dot as everywhere else. 2003-07-20 16:00:40 +00:00
Andrey Hristov
5fcc682ebc proto fixes 2003-07-19 19:23:34 +00:00
Marcus Boerger
f970724d79 Do not test postgres settings 2003-06-30 18:00:30 +00:00
Ilia Alshanetsky
77f11b9f45 Fixed bug #24284 (Fixed memory leak inside pg_ping()) 2003-06-22 16:46:24 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Marcus Boerger
a7d485143c Update 2003-05-31 12:54:20 +00:00
Marcus Boerger
95530c61bf Better fix for default connection handling.
# Problems noticed by Jay with the help of Sascha's nice little script.
2003-05-30 19:12:26 +00:00
Marcus Boerger
1eec984976 Fix handling of default links 2003-05-30 16:51:00 +00:00
Marcus Boerger
3dbe16cac4 Fix notice handling 2003-05-30 15:42:46 +00:00
Marcus Boerger
680653fecb - Fix ini handling in ZTS mode 2003-05-30 15:07:02 +00:00
Marcus Boerger
daded6e633 Reorganized tests 2003-05-20 00:14:46 +00:00
Ilia Alshanetsky
ab0e80d42f emalloc -> safe_emalloc
Fixed possible buffer overflow in pg_lo_read()
2003-04-25 21:59:58 +00:00
Jay Smith
3fbb4dbdc0 Fix some segfaults in some of the pg_lo_* functions. 2003-04-17 16:54:43 +00:00
Jay Smith
dcf0c70950 Fix 'timestamp without timezone', too. 2003-04-01 23:56:16 +00:00
Marcus Boerger
ccfcd0d411 Fix 'time with timezone', too 2003-04-01 23:34:11 +00:00
Jay Smith
cff236c4a6 Fixed bug #23009 (pg_select with timestamp) 2003-04-01 23:26:10 +00:00
David Hill
a7b84ac7cb Correcting int/long mismatched - 64bit issues. 2003-03-10 20:30:33 +00:00
foobar
3c9155e0cb Renamed OnUpdateInt -> OnUpdateLong to prevent further misunderstandings.
# Intentionally left out any 'alias' for it, this way 3rd party extension
# maintainers will really NOTICE the change.
2003-03-07 05:15:28 +00:00
David Hill
5c90216d2c 64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
2003-03-06 23:07:28 +00:00
Justin Erenkrantz
9d89ef3295 Remove C++-style comment. (Breaks Sun Forte compiler.) 2003-02-20 21:48:58 +00:00
foobar
0f593f899f Fixed bug: #22306 (pg_lo_seek($h, 0, PGSQL_SEEK_SET) succeeds but returns false) 2003-02-20 07:10:07 +00:00
Jon Parise
1b8755994e Correct the spelling of 'supported'. 2003-02-10 15:46:47 +00:00
Yasuo Ohgaki
7f81a4a62f Fixed one more improper row offset handling. 2003-02-09 07:50:16 +00:00
Yasuo Ohgaki
ac16adae0a Fixed improper result offset handling.
Prevent error when connection is broken. (optional)
2003-02-09 07:24:18 +00:00
Ilia Alshanetsky
a89a651a46 Made the row parameter in pg_result_seek() non-optional, the current
implementation would result in random behavior if the 2nd argument is not
passed.
Fixed bug #22042 (pg_result_seek() would never seek to the 1st row in the
result due to always seeking to row next to the one requested).
Removed dead code from pg_result_seek().
2003-02-04 18:34:00 +00:00
Ilia Alshanetsky
72b356c1bc Removed pointless memory allocation checks. 2003-01-18 19:28:10 +00:00
Yasuo Ohgaki
345ada81c8 Fixed proto 2003-01-15 10:21:15 +00:00
Anantha Kesari H Y
b3d80fe441 Removed #ifdef NetWare and made the necessary changes in the directory structure of NetWare. 2003-01-06 10:28:34 +00:00
Anantha Kesari H Y
f58016b348 Makefile added newly and modified the header file for NetWare. 2003-01-06 09:05:03 +00:00
Derick Rethans
6439ad7640 - Fixed bug #21232 (Unresolved references to PQsetnonblocking). (Patch by
Floyd <floyd@studiodust.com>)
2003-01-04 12:33:46 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Derick Rethans
16e5459f94 MFB: Fix typo 2002-12-21 17:48:37 +00:00
Ilia Alshanetsky
f620fdbed3 A better memory leak patch. 2002-12-16 07:46:36 +00:00
Ilia Alshanetsky
078dfe8d57 Fixed a memory leak. 2002-12-15 06:44:30 +00:00
Yasuo Ohgaki
e4be6b3ac2 Fixed problem with PostgreSQL 7.3 2002-11-29 17:18:01 +00:00
Yasuo Ohgaki
f0b6f5450c Remove a warning 2002-11-26 02:13:35 +00:00
Yasuo Ohgaki
5c851cba19 Cleanup state=4 and avoid using sscanf() 2002-11-25 01:38:29 +00:00
Sascha Schumann
3f6b470770 Use proper form of NUL
Drop superfluous checks for NULL results
2002-11-24 16:23:37 +00:00
Sterling Hughes
490903da5a null after the erealloc() 2002-11-24 15:11:43 +00:00
Yasuo Ohgaki
5c2fda30b2 Added missing '\0' 2002-11-24 07:45:26 +00:00
Marcus Boerger
8579756c05 Test for bug #14383 2002-11-14 20:30:53 +00:00
Yasuo Ohgaki
f482ac4011 Speed up pg_escape_bytea, from O(n^2) => O(n). My test script speed up
from 50 sec to 5 sec. (sscanf is too slow at least under my linux, I
might write better function that unescape values later)
Use emalloc/erealloc for bundled PQescapeBytea(php_pgsql_escape_bytea)
2002-11-12 09:07:36 +00:00
Ilia Alshanetsky
41a77bccba Fix compile warning. 2002-11-05 14:28:32 +00:00
Marcus Boerger
15b2e277a4 fix compiler warning 2002-10-24 19:15:40 +00:00
Derick Rethans
8998bce403 - Style polizei =) 2002-10-19 12:58:41 +00:00
Yasuo Ohgaki
572b2a5a5a Revert invalid patch. It seems the real problem is in php error
function(s). It exits with return code -1 when php_error_docref()
is called.

There is custom error handler and without custom error handler,
it is working.
2002-10-19 06:05:16 +00:00
Yasuo Ohgaki
29a53a47f6 Skip field when there is obvious error.
Fixed freeing of wrong zval.
2002-10-19 04:46:19 +00:00
Yasuo Ohgaki
98ab76d23c Fixed typo. 2002-10-19 04:01:27 +00:00
Yasuo Ohgaki
5693bd4cdf Added tests for new functions 2002-10-18 07:52:09 +00:00
Yasuo Ohgaki
7094b48b23 Added pg_get_pid() 2002-10-17 23:41:34 +00:00
Yasuo Ohgaki
601a507ad6 Added async message function - pg_get_notify() 2002-10-17 07:58:46 +00:00
Yasuo Ohgaki
1917f5f382 Fixed proto. Clean up. 2002-10-13 09:48:18 +00:00
Yasuo Ohgaki
a6de0807ae Need to init connstring when there are 2 args. 2002-10-13 09:41:35 +00:00
Yasuo Ohgaki
2c23e56c7f Introduce connect_type option to pg_connect().
pg_connect(conn_str, conn_type) is allowed.
@Added PGSQL_CONNECT_FORCE_NEW option to pg_connect() (Yasuo)
# If you have better idea about constant name(s), let me know.
2002-10-13 09:37:27 +00:00
Yasuo Ohgaki
6edd9d2f72 Enable pg_escape_bytea(). 2002-10-13 03:00:48 +00:00
Yasuo Ohgaki
1b675aa690 Rename pg_data_seek() to pg_result_seek().
Added mysql_result_seek() which is alias of mysql_data_seek().
2002-10-03 02:32:09 +00:00
Yasuo Ohgaki
2300bddb9c Fixed pg_escape_typea() 2002-10-02 06:30:40 +00:00
Yasuo Ohgaki
520486e8b1 Clean up a little. 2002-10-02 06:22:52 +00:00
Yasuo Ohgaki
69957c56b3 Added pg_unescape_bytea(). Fixed pg_data_seek().
php_pgsql_unescape_bytea(PQunescapeBytea) is shamelessly stolen from PostgreSQL 7.3 :)
2002-10-02 04:03:21 +00:00
Yasuo Ohgaki
2745e8b9b2 Add some example functions for mysql users. 2002-10-02 03:32:27 +00:00
Yasuo Ohgaki
b8fdd3c7ae Added pg_data_seek().
pg_result_seek() woudl be better name, but there is mysql_data_seek()...
2002-10-02 03:16:35 +00:00
Yasuo Ohgaki
2728440fdc Added pg_ping() 2002-10-02 02:41:21 +00:00
Yasuo Ohgaki
f8f11ac0a2 Rename pg_metadata() to pg_meta_data() to confirm naming standard 2002-10-02 02:11:27 +00:00
Yasuo Ohgaki
545f894524 Added pg_fetch_assoc(). Fixed proto. Added/fixed comments.
# It seems last attempt was failed. Try committing again.
2002-09-30 09:07:57 +00:00
Yasuo Ohgaki
5a6703484d Use PGSQL_CONV_FORCE_NULL as it is supposed.
PGSQL_CONV_FORCE_NULL inserts NULL to field instead of
NULL string for string type tuples.
2002-09-30 07:35:41 +00:00
Yasuo Ohgaki
788e4070b6 Use of PGSQL_CONV_INGORE_NOT_NULL as it is supposed. Change comment a little. 2002-09-30 07:24:41 +00:00
Yasuo Ohgaki
dbd1a45d70 Fix TODO desc 2002-09-30 04:15:39 +00:00
Yasuo Ohgaki
b7d1a58e25 Remove unused def. Add TODO. 2002-09-30 04:15:01 +00:00
Yasuo Ohgaki
90fc47f4d1 Improve error message. Fix proto. 2002-09-30 03:51:54 +00:00
Yasuo Ohgaki
9e252a9616 php_error -> php_error_docref 2002-09-04 22:25:13 +00:00
Yasuo Ohgaki
798236bc93 Changed pg_connection_info()/pg_connection_reset()/pg_connection_busy()/pg_result_status()/pg_result_error() silently return FALSE when resource is not passed to them.
@ Changed pg_connection_info()/pg_connection_reset()/pg_connection_busy()/pg_result_status()/pg_result_error() silently return FALSE when resource is not passed to them. (Yasuo)
2002-08-24 22:28:28 +00:00
Yasuo Ohgaki
e4f9053061 Fixed typo 2002-08-24 07:19:40 +00:00
Yasuo Ohgaki
488a1e7399 Make pg_result_status() a little more useufl by ignoring invalid
parameter and return FALSE.
(i.e. pg_query() may return FALSE instead of result resource)
2002-08-24 07:18:15 +00:00
foobar
06c6a96721 ws fix 2002-08-23 20:57:30 +00:00
Yasuo Ohgaki
05aa532310 Unify error messages 2002-07-28 11:17:57 +00:00
Yasuo Ohgaki
882f83cf81 Copy empty_string, fixed crash.
# I thought efree() won't free empty_string...
2002-07-22 06:38:36 +00:00
Yasuo Ohgaki
36e80ddc15 Added pg_fetch_all() that fetch all rows in result.
Useful and faster when there is enough memory.
@Added pg_fetch_all() that fetch all rows in result. (Yasuo)
2002-07-21 07:25:10 +00:00
Yasuo Ohgaki
78a2781936 Fixed php_pgsql_convert's bool type handling. 2002-07-20 07:45:01 +00:00
Yasuo Ohgaki
0b7f2da4cf Hmm. My PostgreSQL returns "bool" for boolean now. 2002-07-20 07:24:15 +00:00
Yasuo Ohgaki
06c969e68a Fixed convetion when null string is passed to php_pgsql_convert() 2002-07-20 07:08:17 +00:00
Yasuo Ohgaki
c0306424fa Fixed crash. 2002-07-20 06:45:35 +00:00
Yasuo Ohgaki
ba670fb19d Fixed build. 2002-07-17 07:50:32 +00:00
Yasuo Ohgaki
a6384b3685 Added safe_mode & open_basedir checks for pg_lo_export()
@Added safe_mode & open_basedir checks for pg_lo_export() (Yasuo)
2002-07-17 05:01:58 +00:00
Yasuo Ohgaki
166ace3fa9 Added open_basedir check.
@ Added open_basedir check for pg_lo_import() (Yasuo)
2002-07-17 04:58:58 +00:00
Yasuo Ohgaki
a1f37648b3 Clean up code a little (Remove a use of magic number)
Change/add appropriate comments.
2002-07-15 10:04:01 +00:00
Rui Hirokawa
555ca8eedd added mbstring.language option in ext/mbstring. 2002-07-11 15:45:35 +00:00
Derick Rethans
f9b21c4b7d - Fix typo 2002-06-26 13:07:40 +00:00
Edin Kadribasic
16e9e77e2a Fix for #17315. Requires client library 7.2 or greater to compile. 2002-05-21 01:03:13 +00:00
Yasuo Ohgaki
62b8c29083 Fixed possible pg_lo_write() overflow and make it more fail safe. 2002-05-20 01:40:22 +00:00
Yasuo Ohgaki
c6873da401 Improve large object performance. pg_lo_read() and pg_lo_read_all() should perform
much better now.
Fixed Old API support for pg_lo_import().
2002-05-20 01:02:29 +00:00
Yasuo Ohgaki
f314d24d03 Reduce number of realloc calls. 2002-05-11 03:01:08 +00:00
Edin Kadribasic
51cb237aa6 Fix win32 build. 2002-05-10 02:39:37 +00:00
Yasuo Ohgaki
c5b4a507fe Added test for pg_fetch_*() functions 2002-04-25 07:52:01 +00:00
Yasuo Ohgaki
b4c943ee7b Revert last 2 commits.
# Most PostgreSQL users should enable multibyte support ;)
2002-04-25 07:09:45 +00:00
Yasuo Ohgaki
534ba498e3 Fix version in message 2002-04-25 02:40:58 +00:00
Yasuo Ohgaki
c65a20df4a pg_client_encoding/pg_set_client_encoding should be compiled always.
Recent libpq has PQclientEncoding/PQsetClientEncoding regarless of
multibyte support enabled or not.

Reported by c@cornelia-boenigk.de

# This should be merged, but need a little more testing.
2002-04-25 01:42:23 +00:00
Yasuo Ohgaki
48ea7057e4 Remove result_type from pg_fetch_object() proto.
It still accepts 3rd argument, but passing 3rd argument
does not make sense for pg_fetch_object().
2002-04-24 23:03:48 +00:00
Yasuo Ohgaki
cf7f465ef9 It does not make any sense to have a PGSQL_BOTH as a default for pg_fetch_object()
Noticed by c@cornelia-boenigk.de
2002-04-24 22:57:21 +00:00
Yasuo Ohgaki
e7e0eddadd Make pg_convert/pg_insert/pg_select/pg_update/pg_delete a bit more flexible.
pg_convert() may ignore, NOT NULL and/or DEFAULT.
pg_insert/pg_update/pg_select/pg_update may return query string.
2002-04-23 03:42:26 +00:00
Sascha Schumann
ebd957f69e hash keys lengths include the NUL-byte, so we need to copy one byte less.
also add missing commas in the INSERT clause.

Noticed by: Yasuo Ohgaki
2002-04-22 08:18:19 +00:00
Sascha Schumann
d1a1f17628 refactoring in pgsql_do_connect and some "leaner" code in pgsql_add_quotes 2002-04-21 11:29:17 +00:00
Sascha Schumann
c2c23ff6df Avoid allocating resources, if we know that the input array is empty.
Also pass tsrmls to do_exec.
2002-04-21 10:44:31 +00:00
Sascha Schumann
bf87992040 speling fix and s/FAILURE/HASH_KEY_NON_EXISTANT/ 2002-04-21 10:37:40 +00:00
Sascha Schumann
c6016fcfd2 The default has been changed to assume failure, because there were 5-10
cases of failure and one success.
2002-04-21 10:28:01 +00:00
Sascha Schumann
db24a14b9b Add PGSQL_RETURN_OID which encapsulates the LONG_MAX check etc.
Add a few missing smart_str_0's.

Remove a "(" in a probably less-tested #ifdef.. branch
2002-04-21 10:22:31 +00:00
Sascha Schumann
9a7418906c Also support --disable-shared installations of pgsql 2002-04-21 10:18:34 +00:00
Sascha Schumann
7e597b260a My patch as posted to php-dev + warnings/errors fixed as seen in
Yasuo's reply.
2002-04-21 09:46:29 +00:00
Yasuo Ohgaki
3087b96ece Make pg_lo_import()/pg_lo_unlink()/pg_lo_open()/pg_lo_export() work with oid larger than 2^31.
@Added large OID value (2^31 to 2^32) support for pg_lo_import()/pg_lo_unlink()/pg_lo_open()/pg_lo_export(). (Yasuo)
2002-04-20 14:06:47 +00:00
Yasuo Ohgaki
29e3175f97 Added comment to fix large OID value handling later.
Fixed wrong conversion specifiers.
2002-04-20 04:17:17 +00:00
Yasuo Ohgaki
3ee7591ae9 Added missing 'd'. 2002-04-20 03:50:21 +00:00
Yasuo Ohgaki
d845ba2077 Some cleanup.
More OID range related fixes.
# Need a little more work for OID
2002-04-20 03:37:01 +00:00