Commit Graph

276 Commits

Author SHA1 Message Date
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