Ilia Alshanetsky
ea4734926e
MFH: Fixed bug #33167 (Possible crash inside pg_fetch_array()).
2005-10-11 16:19:14 +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
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
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
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
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
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
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
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
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
Ilia Alshanetsky
3b7da77480
Fixed bug #26864 (pg_(update|delete) ignore PGSQL_DML_EXEC option).
2004-01-11 21:18:19 +00:00
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
2004-01-08 08:18:22 +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
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
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
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
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
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
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
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
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
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
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
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
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
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