Yasuo Ohgaki
05aa532310
Unify error messages
24 years ago
Yasuo Ohgaki
882f83cf81
Copy empty_string, fixed crash.
# I thought efree() won't free empty_string...
24 years ago
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)
24 years ago
Yasuo Ohgaki
78a2781936
Fixed php_pgsql_convert's bool type handling.
24 years ago
Yasuo Ohgaki
0b7f2da4cf
Hmm. My PostgreSQL returns "bool" for boolean now.
24 years ago
Yasuo Ohgaki
06c969e68a
Fixed convetion when null string is passed to php_pgsql_convert()
24 years ago
Yasuo Ohgaki
c0306424fa
Fixed crash.
24 years ago
Yasuo Ohgaki
ba670fb19d
Fixed build.
24 years ago
Yasuo Ohgaki
a6384b3685
Added safe_mode & open_basedir checks for pg_lo_export()
@Added safe_mode & open_basedir checks for pg_lo_export() (Yasuo)
24 years ago
Yasuo Ohgaki
166ace3fa9
Added open_basedir check.
@ Added open_basedir check for pg_lo_import() (Yasuo)
24 years ago
Yasuo Ohgaki
a1f37648b3
Clean up code a little (Remove a use of magic number)
Change/add appropriate comments.
24 years ago
Rui Hirokawa
555ca8eedd
added mbstring.language option in ext/mbstring.
24 years ago
Yasuo Ohgaki
62b8c29083
Fixed possible pg_lo_write() overflow and make it more fail safe.
24 years ago
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().
24 years ago
Yasuo Ohgaki
f314d24d03
Reduce number of realloc calls.
24 years ago
Yasuo Ohgaki
b4c943ee7b
Revert last 2 commits.
# Most PostgreSQL users should enable multibyte support ;)
24 years ago
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.
24 years ago
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().
24 years ago
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
24 years ago
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.
24 years ago
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
24 years ago
Sascha Schumann
d1a1f17628
refactoring in pgsql_do_connect and some "leaner" code in pgsql_add_quotes
24 years ago
Sascha Schumann
c2c23ff6df
Avoid allocating resources, if we know that the input array is empty.
Also pass tsrmls to do_exec.
24 years ago
Sascha Schumann
bf87992040
speling fix and s/FAILURE/HASH_KEY_NON_EXISTANT/
24 years ago
Sascha Schumann
c6016fcfd2
The default has been changed to assume failure, because there were 5-10
cases of failure and one success.
24 years ago
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
24 years ago
Sascha Schumann
7e597b260a
My patch as posted to php-dev + warnings/errors fixed as seen in
Yasuo's reply.
24 years ago
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)
24 years ago
Yasuo Ohgaki
29e3175f97
Added comment to fix large OID value handling later.
Fixed wrong conversion specifiers.
24 years ago
Yasuo Ohgaki
3ee7591ae9
Added missing 'd'.
24 years ago
Yasuo Ohgaki
d845ba2077
Some cleanup.
More OID range related fixes.
# Need a little more work for OID
24 years ago
Yasuo Ohgaki
07125ea9f4
Fixed OID overflow. If value is larger than MAX_LONG,
pg_last_oid() returns string to keep correct value.
24 years ago
Yasuo Ohgaki
c53c212da6
Remove warnings.
Fixed OID overflow bug.
Fixed type convertion bug.
# Thank you Edin.
24 years ago
Yasuo Ohgaki
e64696d729
Fixed pg_insert/update/select/delete overflow.
24 years ago
Yasuo Ohgaki
7a8ad06121
Added "NOT NULL" check and do not add converted variable when field is NULL and HAS DEFAULT.
(php_pgsql_convert)
24 years ago
Yasuo Ohgaki
8d8ca2602b
Changed "default" -> "has default" (metadata)
Fixed comment. Do not use magic number.
24 years ago
Yasuo Ohgaki
f463be8408
Leave "" (null string) when converting.
24 years ago
Yasuo Ohgaki
34625daf18
Remove unneeded conversions from pg_convert.
24 years ago
Yasuo Ohgaki
d023a96cc6
Make it compile with ZTS.
# Forgot to test with ZTS
24 years ago
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)
24 years ago
Yasuo Ohgaki
7d48177f37
Return proper result.
24 years ago
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)
24 years ago
Yasuo Ohgaki
dbe3dfda5f
Nuke waring with ZTS build
24 years ago
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.
24 years ago
Yasuo Ohgaki
7f2446e7de
Fix pg_last_notice() double free.
# This should be merged
24 years ago
Yasuo Ohgaki
fafea27a2d
Clean up pg_escape_*()
24 years ago
Yasuo Ohgaki
186823957a
Fixed crash with pg_escape_*()
# I'll MFH later.
24 years ago
Yasuo Ohgaki
266692a59a
Print multibyte and SSL support is compiled in libpq or not.
24 years ago
Yasuo Ohgaki
7ff1412432
Print PostgreSQL version number in phpinfo()
24 years ago
Yasuo Ohgaki
c7d72bb20d
Fix build failure with PostgreSQL 6.5.x
# I'll merge this to 4.2.0 branch later
24 years ago