Daniel Lowrey
2ee4c987e6
Support async pgsql connections and non-blocking queries
...
- New functions (each accepts a pgsql $connection resource):
. pg_connect_poll
. pg_socket
. pg_consume_input
. pg_flush
- Modified functions
The following functions now additionally return zero if the
underlying socket is set to non-blocking mode and the send
operation does not complete immediately. Previously these
functions returned only boolean TRUE/FALSE and blocked
execution while polling until all data was sent:
. pg_send_execute
. pg_send_prepare
. pg_send_query
. pg_send_query_params
- New constants
Used with pg_connect() to initiate an asynchronous connection
attempt:
. PGSQL_CONNECT_ASYNC
Used with pg_connection_status() to determine the current state
of an async connection attempt:
. PGSQL_CONNECTION_STARTED
. PGSQL_CONNECTION_MADE
. PGSQL_CONNECTION_AWAITING_RESPONSE
. PGSQL_CONNECTION_AUTH_OK
. PGSQL_CONNECTION_SSL_STARTUP
. PGSQL_CONNECTION_SETENV
Used with pg_connect_poll() to determine the result of an
async connection attempt:
. PGSQL_POLLING_FAILED
. PGSQL_POLLING_READING
. PGSQL_POLLING_WRITING
. PGSQL_POLLING_OK
. PGSQL_POLLING_ACTIVE
- Polling via returned pg_socket() stream
pg_socket() returns a read-only socket stream that may be
cast to a file descriptor for select (and similar) polling
operations. Blocking behavior of the pgsql connection socket
can be controlled by calling stream_set_blocking() on the
stream returned by pg_socket().
2014-03-17 06:31:15 -06:00
Yasuo Ohgaki
d8aa130296
Imprement FR #25854 Return value for pg_insert should be resource instead of bool
2014-02-17 06:36:54 +09:00
Yasuo Ohgaki
5fd6365c77
Implement FR #41146 - Add "description" with exteneded flag pg_meta_data().
...
pg_meta_data(resource $conn, string $table [, bool extended])
It also made pg_meta_data() return "is enum" always.
2014-02-17 06:24:10 +09:00
Yasuo Ohgaki
170db1c577
Travis has old PostgreSQL server. Avoid test error.
2014-02-16 18:08:50 +09:00
Yasuo Ohgaki
4a2b39269f
It seems travis needs ending >?
2014-02-16 16:40:58 +09:00
Yasuo Ohgaki
56854511d8
EXPERIMENTAL flags for pg_select/pg_insert/pg_update/pg_delete are removed.
...
Use string escape for exotic types that allows to handle any data types. i.e. Array, JSON, JSONB, etc will work.
Add escape only query for better performance which removes meta data look up. Limitations forced by pg_convert() can be avoided with this. PGSQL_DML_ESCAPE constant is added for it.
2014-02-16 14:11:21 +09:00
Yasuo Ohgaki
c58329fccc
Always initialize pg_version() result array elements to prevent failed test with older postgresql servers. Add missing client_encoding element.
2014-01-15 14:27:33 +09:00
Yasuo Ohgaki
58dff7cee5
Made pg_version() return full connection info.
2014-01-14 10:10:48 +09:00
Nikita Popov
1a88fcc2d8
Remove trailing whitespace in test
...
Third try to make this work...
2013-08-22 13:09:53 +02:00
Nikita Popov
96045e1b33
Forgot newline in test
2013-08-22 12:26:34 +02:00
Nikita Popov
b668a26c2f
Fix pgsql notice test failure
2013-08-22 11:31:56 +02:00
Yasuo Ohgaki
fdef0e38f7
Revert wrong description
2013-08-20 17:38:17 +09:00
Yasuo Ohgaki
7d538cf8dd
Fixed test bug
2013-08-20 14:25:12 +09:00
Yasuo Ohgaki
e960eebfea
Revise pgsql tests
2013-08-18 18:24:34 +09:00
Yasuo Ohgaki
3ada3aaea6
Revise pgsql test files
2013-08-12 05:14:43 +09:00
Yasuo Ohgaki
727318546d
Revise pgsql test for Travis CI
2013-08-11 18:57:39 +09:00
Yasuo Ohgaki
713aedfe65
Add 00version.phpt to get server/protocol/client version. Revise test script description
2013-08-11 18:33:33 +09:00
Stanislav Malyshev
29f1aa2618
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
ensure notices are not ignored when tests need them
2013-08-10 23:12:51 -07:00
Stanislav Malyshev
cf39c3d638
ensure notices are not ignored when tests need them
2013-08-10 23:12:04 -07:00
Yasuo Ohgaki
cb8d1fc7f9
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #62978 . pg_select()/etc may allow SQL injection when table name is user parameter, users are able to control table names.
2013-08-05 18:24:07 +09:00
Yasuo Ohgaki
f718684a6c
Fixed bug #62978 . pg_select()/etc may allow SQL injection when table name is user parameter, users are able to control table names.
2013-08-05 18:23:15 +09:00
Matteo Beccati
9b8259cdfa
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #65047 (Test skip on client / server version)
Remove broken client version checking
Clean up leftover file after the test
2013-06-19 11:53:05 +02:00
Matteo Beccati
c666239265
Fixed bug #65047 (Test skip on client / server version)
2013-06-19 11:48:03 +02:00
Matteo Beccati
25e9aa6b0a
Remove broken client version checking
2013-06-19 11:48:03 +02:00
Matteo Beccati
5edd530511
Clean up leftover file after the test
2013-06-19 11:48:03 +02:00
Matteo Beccati
d5a1c0cae2
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #64609 (pg_convert enum type support)
2013-06-02 06:34:05 +02:00
Matteo Beccati
51c065f611
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fixed bug #64609 (pg_convert enum type support)
2013-06-02 06:33:54 +02:00
Matteo Beccati
25aae37229
Fixed bug #64609 (pg_convert enum type support)
2013-06-02 06:29:35 +02:00
Matteo Beccati
d9c2eecec0
Merge branch 'PHP-5.4' into PHP-5.5
...
* PHP-5.4:
Fixed bug #62857 (bytea test failures)
2013-06-01 23:23:14 +02:00
Matteo Beccati
de42833115
Merge branch 'PHP-5.3' into PHP-5.4
...
* PHP-5.3:
Fixed bug #62857 (bytea test failures)
2013-06-01 23:22:50 +02:00
Matteo Beccati
79803bebde
Fixed bug #62857 (bytea test failures)
...
Postgres 9.1+ test fixes. Tests were failing due to the default
standard_conforming_strings GUC being changed to on. Also the
pg_escape_bytea test was encoding the data before estabilishing
a connection, thus falling back to the old escaping type which
isn't properly handled by the backend when using a default
configuration.
I haven't updated the NEWS file as it's just test fixes.
2013-06-01 23:15:48 +02:00
Nikita Popov
430c987716
Skip locale dependent test if locale not available
2013-03-23 21:09:21 +01:00
Lars Strojny
92965b033a
Bug #46408 : Fix double formatting for PostgreSQL bound parameters
2013-01-14 21:23:52 +01:00
Xinchen Hui
610c7fbe7b
Remove executable permission on phpt
2012-10-10 10:27:49 +08:00
Xinchen Hui
e081c55fb5
Merge branch 'PHP-5.3' into PHP-5.4
2012-10-10 10:31:31 +08:00
Yasuo Ohgaki
655245afef
add pg_escape_identifier/pg_escape_literal
2012-04-19 13:40:24 -07:00
Ilia Alshanetsky
b6530d8978
Fixed bug #60244 (pg_fetch_* functions do not validate that row param is >0).
2011-11-15 18:02:58 +00:00
Ilia Alshanetsky
4cf3c8c558
Fixed bug #60244 (pg_fetch_* functions do not validate that row param is >0).
2011-11-15 18:02:58 +00:00
Matteo Beccati
18b8a3bcb7
Fixed a few false positives on gcov for ext/pgsql
2011-08-30 14:01:03 +00:00
Matteo Beccati
238a51ec6e
Fixed a few false positives on gcov for ext/pgsql
2011-08-30 14:01:03 +00:00
Felipe Pena
996f45b688
- Fixed bug #47199 (pg_delete() fails on NULL)
...
patch by: ewgraf at gmail dot com
2010-11-06 17:43:25 +00:00
Felipe Pena
ccfe9c30aa
- Fixed bug #47199 (pg_delete() fails on NULL)
...
patch by: ewgraf at gmail dot com
2010-11-06 17:43:25 +00:00
Matteo Beccati
166b3ef63d
Removed spurious high-ascii char from previous commmit
2009-12-25 21:01:06 +00:00
Matteo Beccati
09587d3cbf
- Updated ext/pgsql tests to work w/ PostgreSQL 8.5
...
# tested w/ 8.5alpha3
2009-12-25 20:56:00 +00:00
Ilia Alshanetsky
309533842f
MFB: ext/pgsql/tests/80_bug14383.phpt
2009-04-06 14:23:07 +00:00
Felipe Pena
d295d9113e
- MFH: Fix test
2009-01-30 14:50:05 +00:00
Felipe Pena
8563497a94
MFH:
...
- Fixed:
. Memory leak in pg_delete() when using PGSQL_DML_STRING.
. Bug #24679 (pg_insert problem!)
. Bug #35996 (pg_meta_data should take the schema into account)
. Bug #40808 (pg_insert problem)
. Bug #42078 (pg_meta_data mix tables metadata from different schemas)
- Improved:
. Error messages
- Added:
. Tests
2008-10-16 00:39:31 +00:00
Felipe Pena
310ac30e5a
MFH:
...
- Fixed bug #37100 (data is returned truncated with BINARY CURSOR)
Patch by Tony
2008-10-13 13:44:32 +00:00
Hartmut Holzgraefe
6fcc0ec369
splitted test cases for lo_create and lo_import, added version aware
...
SKIP tests
2008-07-23 09:06:59 +00:00
Hartmut Holzgraefe
432b57b2ae
added support for object ids in pg_lo_create() and pg_lo_import() where available
...
(based on code provided by Tatsuo Ishii)
2008-07-23 00:17:19 +00:00