Commit Graph

536 Commits

Author SHA1 Message Date
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
Yasuo Ohgaki
07125ea9f4 Fixed OID overflow. If value is larger than MAX_LONG,
pg_last_oid() returns string to keep correct value.
2002-04-20 03:03:42 +00:00
Yasuo Ohgaki
04fb5ef2e3 Added API version for C programs 2002-04-20 02:38:30 +00:00
Yasuo Ohgaki
c53c212da6 Remove warnings.
Fixed OID overflow bug.
Fixed type convertion bug.
# Thank you Edin.
2002-04-20 02:31:48 +00:00
Yasuo Ohgaki
e64696d729 Fixed pg_insert/update/select/delete overflow. 2002-04-19 13:09:09 +00:00
Yasuo Ohgaki
825e011805 Update tests 2002-04-19 12:24:58 +00:00
Yasuo Ohgaki
7a8ad06121 Added "NOT NULL" check and do not add converted variable when field is NULL and HAS DEFAULT.
(php_pgsql_convert)
2002-04-19 12:24:14 +00:00
Yasuo Ohgaki
8d8ca2602b Changed "default" -> "has default" (metadata)
Fixed comment. Do not use magic number.
2002-04-19 12:19:29 +00:00
Yasuo Ohgaki
f463be8408 Leave "" (null string) when converting. 2002-04-19 07:47:53 +00:00
Yasuo Ohgaki
34625daf18 Remove unneeded conversions from pg_convert. 2002-04-08 04:21:04 +00:00
Yasuo Ohgaki
d023a96cc6 Make it compile with ZTS.
# Forgot to test with ZTS
2002-04-08 02:01:45 +00:00
Yasuo Ohgaki
8fab36f99c Update README 2002-04-08 01:50:06 +00:00
Yasuo Ohgaki
4ac70c6821 Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
and pg_delete().
@ Added pg_metadate(), pg_convert(), pg_insert(), pg_select(), pg_update()
@ and pg_delete(). (Yasuo)
2002-04-08 01:37:38 +00:00
Yasuo Ohgaki
7d48177f37 Return proper result. 2002-04-08 00:50:44 +00:00
Yasuo Ohgaki
994cdb4b14 Added 2nd parameter for pg_result_status(). PGSQL_STATUS_LONG is for LONG result status.
PGSQL_STATUS_STRING is for SQL command name successfully executed for this result.
@ Added 2nd parameter for pg_result_status() to specify return type. (Yasuo)
2002-04-08 00:43:58 +00:00
Yasuo Ohgaki
dbe3dfda5f Nuke waring with ZTS build 2002-04-07 05:21:43 +00:00
Yasuo Ohgaki
179a52b025 Chages for new pg_last_notice() 2002-04-06 06:42:02 +00:00
Yasuo Ohgaki
b2fce9e893 Make pg_last_notice() work as it is designed. It returns last notice message for connection resource specified.
Added "pgsql.ignore_notice" ini entry.
Added "pgsql.log_notice" ini entry.
@ Make pg_last_notice() work as it is designed. It returns notice message PostgreSQL connection resource specified.
@ Added "pgsql.ignore_notice" ini entry.
@ Added "pgsql.log_notice" ini entry.
2002-04-06 05:52:52 +00:00
Yasuo Ohgaki
1abb9cd02c Add error message from _notice_handler()
# Currently, it always logs whennever notice message is
# recieved. I'll change error log optional later.
2002-04-05 07:57:33 +00:00
Yasuo Ohgaki
7f2446e7de Fix pg_last_notice() double free.
# This should be merged
2002-04-05 06:37:26 +00:00
Yasuo Ohgaki
a9452edac7 Add notice message test
# Need to figure out why estrduped string is not null terminated
2002-04-05 06:30:18 +00:00
Yasuo Ohgaki
d84f0e5530 Update message 2002-04-05 06:07:46 +00:00
Yasuo Ohgaki
04691a516b Add bytea field to test table.
Use table name variable.
2002-04-05 06:06:21 +00:00
Yasuo Ohgaki
22007a29de Add real pg_escape_bytea() test. 2002-04-05 06:05:28 +00:00
Yasuo Ohgaki
24b76bba21 Fix tests 2002-04-04 15:25:46 +00:00
Yasuo Ohgaki
68f8029fbb Added pg_escape_*() test 2002-04-04 13:59:44 +00:00
Yasuo Ohgaki
fafea27a2d Clean up pg_escape_*() 2002-04-04 13:54:51 +00:00
Yasuo Ohgaki
186823957a Fixed crash with pg_escape_*()
# I'll MFH later.
2002-04-04 10:25:12 +00:00
Yasuo Ohgaki
266692a59a Print multibyte and SSL support is compiled in libpq or not. 2002-03-31 01:45:22 +00:00
Yasuo Ohgaki
7ff1412432 Print PostgreSQL version number in phpinfo() 2002-03-31 01:18:32 +00:00
Yasuo Ohgaki
c7d72bb20d Fix build failure with PostgreSQL 6.5.x
# I'll merge this to 4.2.0 branch later
2002-03-29 11:24:54 +00:00
Yasuo Ohgaki
ec0c373992 Remove warnings 2002-03-26 08:49:36 +00:00
Yasuo Ohgaki
c8a3623708 Changed error messages to be consistent with other error messages 2002-03-26 08:43:57 +00:00
Markus Fischer
1d75089d8b *** empty log message *** 2002-03-21 22:35:02 +00:00
Yasuo Ohgaki
4094513915 Show function name in error message. 2002-03-21 00:06:45 +00:00
Wez Furlong
659a071e3d Streams are all tracked as resources now.
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong
d2d8762267 Streams now make more use of the memory manager, so tracking down
leaking streams should be easier.
# I hate these big commits
2002-03-17 22:50:59 +00:00
Wez Furlong
09213d7bf8 change * formatting 2002-03-16 01:28:57 +00:00
jim winstead
d3400b2b5f the 'setup' script was removed more than two years ago.
these can be safely removed from the 4.2 branch, too.
2002-03-16 00:21:40 +00:00
Wez Furlong
0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
Andi Gutmans
c8e7db984c - Allow duality between Engine 1 & 2 using ZEND_STANDARD_CLASS_DEF_PTR 2002-03-12 20:18:01 +00:00
Sascha Schumann
5cba3a99c2 extension converted automatically to PHP_NEW_EXTENSION. Manually confirmed 2002-03-12 16:44:00 +00:00
Yasuo Ohgaki
1718f1bd33 Print function names in error messages 2002-03-11 14:53:59 +00:00
Yasuo Ohgaki
8885f79909 WS and indent 2002-03-11 07:23:07 +00:00
Yasuo Ohgaki
2a6ae3b7db Add comments for constants. Remove unneeded constants included by mistake. 2002-03-11 07:19:57 +00:00
Yasuo Ohgaki
8b8fcff81b Fix possible build error under Windows.
# Recent libpq under windows supports PQcmdTuples, right?
2002-03-11 07:09:12 +00:00
Derick Rethans
bc7e0b5512 - Make the 2nd parameter to pgsql_fetch_* support NULL in case 3 parameters
are supplied, but you do not want to provide a row number yourself.
@- Make the 2nd parameter to pgsql_fetch_* support NULL in case 3
@  parameters are supplied, but you do not want to provide a row number
@  yourself. (Derick)
2002-03-02 19:53:11 +00:00
Yasuo Ohgaki
6ecd17100e Update doc 2002-03-01 11:52:04 +00:00
Yasuo Ohgaki
fe72f742eb Fix problem with sesssion_pgsql module 2002-02-15 03:30:15 +00:00
Yasuo Ohgaki
c1507e1e40 Initialize automatic persistent connection reset flag 2002-02-12 10:01:08 +00:00
Yasuo Ohgaki
39ad453266 Clean up code.
Removed PHP_PGSQL_API macro.
Define pgsql_globals_id
# Need a little more clean up
2002-02-06 07:25:51 +00:00
Yasuo Ohgaki
b42f0b0d43 Make module specified functions to static.
Added TSRMLS_D/C, get rid of one TSRMLS_FETCH.
2002-02-06 07:16:10 +00:00
Yasuo Ohgaki
1ea87faeb1 Added "auto_reset_presistent" ini entry. 2002-01-25 00:43:50 +00:00
Yasuo Ohgaki
c815a20aee Revert last 2 commit. Instead, make php_pgsql_do_connect() to catch
broken connection always.
# I think this is better than check&reset connection when query
# functions are called.
2002-01-24 09:27:43 +00:00
Yasuo Ohgaki
448dbd72cd Add a little more fault tolerance for pg_host, pg_tty and more. 2002-01-24 06:40:10 +00:00
Yasuo Ohgaki
ddee00da0e No more httpd restart is required when PostgreSQL is rebooted.
# Works for pg_query()/pg_send_query()
2002-01-24 06:20:33 +00:00
Yasuo Ohgaki
ae64c5cec3 Fixed typo and proto 2002-01-21 00:36:22 +00:00
Yasuo Ohgaki
7d819fc0cf Fix bug in test script 2002-01-10 06:44:02 +00:00
Uwe Steinmann
990c27a23a - fixed typo in deprecated functionname 2002-01-09 08:09:16 +00:00
Yasuo Ohgaki
d9149f023d Added when experimental functions are added. 2001-12-20 02:31:44 +00:00
Yasuo Ohgaki
806f578365 Updated README. Module will not cancel queued query sent. 2001-12-19 05:57:57 +00:00
Yasuo Ohgaki
4ae3af8a3c Do not cancel queued query automatically. 2001-12-19 05:41:26 +00:00
Yasuo Ohgaki
8e52216b2e More proper error message.
Remove old lines that aren't needed.
2001-12-18 23:52:55 +00:00
Yasuo Ohgaki
ee012b03c1 Get rid of useless path from seach path 2001-12-18 23:47:12 +00:00
Hartmut Holzgraefe
a16b64b7aa yet another proto fix 2001-12-17 12:14:46 +00:00
Hartmut Holzgraefe
eb42e4a847 proto fixes 2001-12-17 11:53:38 +00:00
Hartmut Holzgraefe
67d9cd6975 proto fix 2001-12-17 11:48:07 +00:00
Yasuo Ohgaki
3778705036 Actually drop test table.
# name is dropdb since it may be changed to actually destory test db
2001-12-17 02:20:43 +00:00
Yasuo Ohgaki
0f12a9ca33 Use database named test for testing 2001-12-17 02:09:07 +00:00
Yasuo Ohgaki
1fc2a27fa5 Funtion rename:
Functions are renamed accoding to coding stanard. Some functions has
completely different name now.
New functions:
pg_copy_to()/pg_copy_from() - by Youichi Iwakiri <yiwakiri@st.rim.or.jp>
pg_lo_tell()/pg_lo_seek()/pg_result_error()/pg_result_status()
pg_escape_string()/pg_escape_bytea() - Only pgsql 7.2 or later.
Fixed:
Wrong mode when clean up connection resource.
Compiler warning for pg_encoding_to_char().
# Please do not document new functions, yet.
# For new functions and other info, please read README
# in module dir.
2001-12-17 00:24:59 +00:00
Yasuo Ohgaki
9a40810c85 Added test files 2001-12-17 00:16:48 +00:00
Yasuo Ohgaki
13dbb1553c README update
Raise error for bogus installation path for --with-pgsql
Added check for pg_escape_*
2001-12-16 15:36:33 +00:00
Hartmut Holzgraefe
afba31f440 proto fixes 2001-12-16 09:56:01 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Yasuo Ohgaki
02c1e81a54 More README update. 2001-12-11 08:15:25 +00:00
Yasuo Ohgaki
f4eff912d9 README update 2001-12-11 07:57:48 +00:00
Yasuo Ohgaki
35cc422378 Added README file for pgsql module
Added my self to CREDIT
2001-12-11 07:44:46 +00:00
Yasuo Ohgaki
9b405fa636 Fix proto 2001-12-10 06:14:03 +00:00
Yasuo Ohgaki
db8bb9f23c Added async query functions 2001-12-10 04:02:08 +00:00
foobar
f1397d5339 Unified the configure messages. 2001-11-30 19:00:13 +00:00
Stig Bakken
689252082c * zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Zeev Suraski
dd01c11ee3 Fix pg_last_notice() 2001-09-26 21:44:48 +00:00
Jeroen van Wolffelaar
c033288573 Back-substitute for Z_* macro's. If it breaks some extension (the script isn't optimal, it parses for example var->zval.value incorrect) please let me know. 2001-09-25 21:58:48 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
foobar
601b4727b6 If the header file is not found, bail out. 2001-08-14 08:53:48 +00:00
Andi Gutmans
9a3d4e736c - More ZE2 fixes 2001-08-13 16:13:25 +00:00
Sascha Schumann
23b9300fd1 more tsrm cleanup 2001-08-06 03:50:52 +00:00
Sascha Schumann
b349df6364 some more eliminate-fetches-or-escalate-them-at-least 2001-08-05 16:21:33 +00:00
foobar
474da88b4c more ZTS fixes. 2001-07-31 23:47:35 +00:00
Zeev Suraski
b1de7fc900 More TSRMLS_FETCH annihilation. Enough for today... 2001-07-31 07:09:49 +00:00
Zeev Suraski
aa1772ca72 More TSRMLS_FETCH annihilation 2001-07-31 05:44:11 +00:00
Zeev Suraski
d76cf1da18 More TSRMLS_FETCH work 2001-07-31 04:53:54 +00:00
Zeev Suraski
c43806f415 Zend compatibility patch 2001-07-30 08:24:42 +00:00
Zeev Suraski
797a079a95 More TSRMLS_FETCH work, and a bit of cleanup 2001-07-30 06:18:13 +00:00
Jon Parise
a0fa32b646 Fix typo. 2001-07-29 01:46:37 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Zeev Suraski
fe6f8712a4 - Get rid of ELS_*(), and use TSRMLS_*() instead.
- Move to the new ts_allocate_id() API
This patch is *bound* to break some files, as I must have had typos somewhere.
If you use any uncommon extension, please try to build it...
2001-07-27 10:16:41 +00:00
Rasmus Lerdorf
b9325a36a8 Fix for #11941 2001-07-13 17:13:00 +00:00
foobar
bc3482d65f Fixed bug: #11728. Error message was cleared before outputted in pg_pconnect() 2001-06-29 03:12:06 +00:00
Jon Parise
dbd51aaf61 Allow the PostgreSQL driver to do internal row counting when iterating
through a result set.

Submitted by: Georg von Zezschwitz <gvz@2scale.net>
2001-06-19 18:10:08 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
foobar
d1a382a1e8 Fixed bug: #11265 2001-06-04 08:06:07 +00:00
Sterling Hughes
687a1c1abe ws fix 2001-05-28 03:30:11 +00:00
foobar
49d18d9f25 Fix by Sterling Hughes. Fixes bugs: #10939, #10756, #10324 2001-05-27 23:26:58 +00:00
foobar
02400e339b remove ws, kill one compile warning. 2001-05-27 22:54:54 +00:00
Egon Schmid
3ceeb1ff40 Fix some protos. 2001-05-27 01:21:30 +00:00
Sterling Hughes
04908b1415 @ Made the length argument (argument 2) to pg_loread() optional,
@ if not specified data will be read in 1kb chunks. (Sterling)

@ Added a third argument to pg_lowrite() which is the length of
@ the data to write. (Sterling)
2001-05-27 01:10:36 +00:00
Stig Bakken
1beda9ee1e * include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build) 2001-05-24 10:07:29 +00:00
Sascha Schumann
afdaee9e47 Nuke more quotes 2001-05-12 11:09:05 +00:00
Egon Schmid
58d2b0a52b Corrected one proto. 2001-05-06 06:33:48 +00:00
Rasmus Lerdorf
4f059abacf Add pg_last_notice() function 2001-05-06 01:34:56 +00:00
Daniel Beulshausen
0a121f855c make pgsql build under win32 again 2001-04-30 14:23:41 +00:00
Zeev Suraski
6487d08e6b Accept the fix suggestion from bug #9562 2001-04-29 17:33:11 +00:00
Rui Hirokawa
053994b5eb deleted warning output in dbx/pgsql. 2001-04-14 10:32:14 +00:00
Romolo Manfredini
0509957bc3 pg_close not closing right connection. 2001-04-05 12:29:24 +00:00
Thies C. Arntzen
cc48dd2138 make it compile with 6.5.x
postgresql notices are now send to the standard error-log
2001-04-04 21:40:41 +00:00
foobar
8a26918ed1 Renamed the AC_ prefixed macros defined in acinclude.m4 to PHP_* prefixes.
# Heads up people! I tested this before committing but you never know..
2001-03-27 20:35:04 +00:00
Romolo Manfredini
99e5dfd00e pg_close was undefining default_conn even if a ref to it was still there. 2001-03-26 08:00:43 +00:00
Romolo Manfredini
7a102a4669 Solved bugs #9746 and #9937, pg_close was closing twice the default conn. 2001-03-24 18:36:43 +00:00
Daniel Beulshausen
00b8f898e7 fix dsp 2001-03-20 17:45:10 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Daniel Beulshausen
10695935e0 added missing ELS_FETCH() 2001-02-20 15:34:10 +00:00
Sascha Schumann
0eec8cf2f7 Simpler fix for the InvalidOid thing by Tom Lane.
He assured me that InvalidOid has always expanded to (Oid) 0, so this
should be safe.
2001-02-19 16:31:17 +00:00
Sascha Schumann
1e6be5aaf5 Fix incompatibility with PostgreSQL CVS.
We now perform a check whether we need to include <postgres.h> to
succesfully compile.

PR: #9328
2001-02-19 08:14:45 +00:00
Sascha Schumann
b91b1779a5 Fix warning 2001-02-19 07:50:06 +00:00
Sascha Schumann
5db26dd415 Allow passing relative paths to --with-pgsql 2001-02-19 07:49:16 +00:00
Zeev Suraski
c239da7e66 Fix the PostgreSQL fix... 2001-02-15 02:15:36 +00:00
Thies C. Arntzen
9d6f117938 remove stupid PGSQL warning 2001-02-13 20:13:14 +00:00
Thies C. Arntzen
f6925611fb @- PostgreSQL now does a rollback at the end of a request on every
@  persistent connection. This is done by doing an "empty" transaction
@  on the connection (This was advised by someone from the PostgreSQL
@  core-team). If you leave transactions open on your page you will see a
@  "NOTICE:  BEGIN: already a transaction in progress" message in your
@  apache error_log. This message is created by the PostgreSQL libs - we can
@  do nothing about it. (Thies)
2001-02-13 18:28:24 +00:00
Thies C. Arntzen
79a38a1c3a @- fixes PostgeSQL pg_connect() bug. We would sometimes close the default
@  link by acciedent. (Patch by: aja@nlgroup.ca)
2001-02-13 16:54:48 +00:00
Andi Gutmans
0611acb910 - Change unset() functions to null(). unset() is legacy 2001-01-31 21:53:30 +00:00
Sascha Schumann
5d03ac038d Revert last completely broken patch. 2001-01-20 10:10:50 +00:00
Derick Rethans
82d58bdc4a - Added the pg_lolseek function, which allows for arbitrary seeking within
a large object, and the pg_lotell call, which can be used to find the
  current file offset for a large object (Submitted by: Adam Haberlach
  <adam@newsnipple.com>).
@- Added the pg_lolseek and pg_lotell functions (Derick)
2001-01-18 22:17:05 +00:00
Jouni Ahto
abcdb47fc2 Changing my email address... 2001-01-04 11:15:35 +00:00
Sascha Schumann
08d104e040 Don't increase the refcount of id, if we already have increased the refcount
of the same id before.

PR: #8225
2000-12-13 12:26:25 +00:00
Hartmut Holzgraefe
1f6878e912 2nd step towards auto-credits 2000-11-20 10:33:33 +00:00
Zeev Suraski
6d0749a95b Fix msql_close(), pg_close() and sybase_close() (Sybase CT) 2000-11-03 02:46:49 +00:00
Zeev Suraski
e560ecfa47 Fix pg_close() 2000-11-03 00:51:53 +00:00
Andi Gutmans
d0ec3df288 - Use CHECKUID_* #define's instead of cryptic numbers in php_checkuid()
- I did not test for validity of the actual php_checkuid() calls and there
- might be mistakes in the previous code.
2000-11-02 23:08:07 +00:00
Andrei Zmievski
f1dcb32c9f Use zend_register_list_destructors_ex() instead. 2000-10-25 17:44:02 +00:00
Andrei Zmievski
7b4983c8f8 Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
  * Switched register_list_destructors() to use
    zend_register_list_destructors_ex() instead
  * Updated all relevant modules to provide the resource type name
    to register_list_destructors() call
  * Updated var_dump() to output resource type name instead of number

@- Made resource type names visible, e.g. var_dump() and
@  get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Zeev Suraski
ac0880fd8f Remove conflict 2000-10-11 18:00:18 +00:00
Zeev Suraski
8fc4200414 Old PostgreSQL fix I forgot to commit, and NEWS consistency update 2000-10-11 13:27:21 +00:00
Rasmus Lerdorf
b189759bcd Clean up the alignment of configure --help output 2000-10-02 17:36:01 +00:00
Daniel Beulshausen
eba5d76078 removed ignoring msvcrt(d) libary 2000-09-28 20:25:03 +00:00
Andi Gutmans
526d45e95f - The Sprit of PHP is to have descriptive function names and not
necessarily short ones. Maybe we should have some FAQ for this?
2000-09-13 04:13:36 +00:00
Rui Hirokawa
4ffaf35556 updated some functions'name using obsolete name convention. 2000-09-12 23:19:58 +00:00
Jouni Ahto
0c1620840f - Renamed functions so that this extension finally starts to follow the
recommended naming scheme of PHP.
2000-09-11 21:28:47 +00:00
Jouni Ahto
d9e180b9b7 - Use the same check for existence of a valid link as the other functions.
- Return TRUE if everything went OK.
- Fixed the number of arguments to pg_endcopy.
- Removed unused variables.
- Indentation, changed spaces to tabs.
2000-09-11 18:34:06 +00:00
Derick Rethans
68611e2d55 - Added functions pg_putline and pg_endcopy (thanks to Dirk Elmendorf
<delmendo@rackspace.com>)
@ Added functions pg_putline and pg_endcopy (Dirk Elmendorf)
2000-09-11 15:34:14 +00:00
Jouni Ahto
20fe0a5685 Fixed #6627. Wrong logic... 2000-09-09 09:40:16 +00:00
Daniel Beulshausen
b6f0d041f9 deleted a few unnecceasary defines and added the Release_TS_Inline path to the libpath 2000-08-24 17:48:30 +00:00
Daniel Beulshausen
5d09d7d811 some fixes 2000-08-22 18:13:53 +00:00
Jouni Ahto
e85ba0901a - Return NULL type when column is NULL, now that we have it in PHP4.
- Fixed a bug in handling NULL columns, PQgetvalue() doesn't return a NULL
  pointer in this case, but a pointer to a string of 0 length...
2000-08-16 01:03:20 +00:00
Jouni Ahto
3d1b363967 Fix #5817 and really, really check what gets passed further... 2000-07-29 06:07:26 +00:00
Jouni Ahto
ecb7b4d271 Removed an extra tab, it caused problems for Digital Unix' poor native make... 2000-07-29 04:45:38 +00:00
Jouni Ahto
d88fe953ae This should fix #5826. 2000-07-29 04:24:11 +00:00
Sascha Schumann
b74e079ce7 The official product name is PostgreSQL, so s/PostgresSQL/PostgreSQL/ 2000-07-11 12:38:06 +00:00
Jouni Ahto
344955d020 - Still one misssing zend_list_addref() and small fix in pg_close.
Fixes #5349 (but not the way reporter wants...).

# There's something in the way database_connect/close functions behave when
# implemented the way as in mysql module that I find a bit strange... because
# of that extra zend_list_addref() there to prevent default link disappearing
# if it's not assigned to variable, when it is, I guess its' reference count
# is at this point 2, I can do: open a db link and assign it to a variable,
# close the link and still use it afterwards.
2000-07-05 22:17:30 +00:00
Jouni Ahto
bcb7639fb3 - Test pg_encoding_to_char instead (it's existence in libpq means that
PostgreSQL was compiled with multibyte support and client encoding
  functions do something meaningful). Fixes #5417.
2000-07-05 21:28:16 +00:00
Sascha Schumann
16017f6d78 Change header protection macros to conform to standard.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"

  All identifiers that begin with an underscore and either an uppercase
  letter or another underscore are always reserved for any use by the
  implementation.
2000-07-02 23:46:51 +00:00
Rui Hirokawa
074f52f382 added new functions: pg_setclientencoding, pg_clientencoding in Postgres-7.0. 2000-07-02 08:59:44 +00:00
Andi Gutmans
1dcee33866 - Get rid of absolute path 2000-06-29 16:08:02 +00:00
Andi Gutmans
bd8aeb5342 - Make pgsql compile on Windows. 2000-06-29 16:00:30 +00:00
Jouni Ahto
9322b9d9a5 (pg_loreadall) Was using zval ** but forgot to convert to use
zend_get_parameters_ex(). Fixes #5244.
2000-06-27 13:26:04 +00:00
Zeev Suraski
7da710c060 - Update .dsp
- Add Win32 'spec' file
2000-06-25 18:54:55 +00:00