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
Yasuo Ohgaki
ec0c373992
Remove warnings
24 years ago
Yasuo Ohgaki
c8a3623708
Changed error messages to be consistent with other error messages
24 years ago
Markus Fischer
1d75089d8b
*** empty log message ***
24 years ago
Yasuo Ohgaki
4094513915
Show function name in error message.
24 years ago
Wez Furlong
659a071e3d
Streams are all tracked as resources now.
Add some logic that will help track down leaks
when debug is enabled.
24 years ago
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
24 years ago
Wez Furlong
09213d7bf8
change * formatting
24 years ago
Wez Furlong
0f65280cb5
New PHP streams...
24 years ago
Andi Gutmans
c8e7db984c
- Allow duality between Engine 1 & 2 using ZEND_STANDARD_CLASS_DEF_PTR
24 years ago
Yasuo Ohgaki
1718f1bd33
Print function names in error messages
24 years ago
Yasuo Ohgaki
8885f79909
WS and indent
24 years ago
Yasuo Ohgaki
2a6ae3b7db
Add comments for constants. Remove unneeded constants included by mistake.
24 years ago
Yasuo Ohgaki
8b8fcff81b
Fix possible build error under Windows.
# Recent libpq under windows supports PQcmdTuples, right?
24 years ago
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)
24 years ago
Yasuo Ohgaki
c1507e1e40
Initialize automatic persistent connection reset flag
24 years ago
Yasuo Ohgaki
39ad453266
Clean up code.
Removed PHP_PGSQL_API macro.
Define pgsql_globals_id
# Need a little more clean up
24 years ago