]> granicus.if.org Git - php/commitdiff
Merge branch 'pgsql-async' into PHP-5.6
authorDaniel Lowrey <rdlowrey@php.net>
Mon, 17 Mar 2014 12:45:37 +0000 (06:45 -0600)
committerDaniel Lowrey <rdlowrey@php.net>
Mon, 17 Mar 2014 13:55:42 +0000 (07:55 -0600)
* pgsql-async:
  Support async pgsql connections and non-blocking queries

1  2 
NEWS
UPGRADING

diff --cc NEWS
index c5fbb6cd9964a4ab58c427ced057c1fb3c1aeece,1682ef06698d5b8d5a4e55a027a86e184b589b06..d5d1ddb8598007e0e5a6d84f09eb6b07ae6a818b
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -75,6 -68,6 +75,17 @@@ PH
      without preparing them, while still passing parameters separately from
      the command text using PQexecParams. (Matteo)
  
++- Pgsql:
++  . Read-only access to the socket stream underlying database connections is
++    exposed via a new pg_socket() function to allow read/write polling when
++    establishing asynchronous connections and executing queries in non-blocking
++    applications. (Daniel Lowrey)
++  . Asynchronous connections are now possible using the PGSQL_CONNECT_ASYNC
++    flag in conjunction with a new pg_connect_poll() function and connection
++    polling status constants. (Daniel Lowrey)
++  . New pg_flush() and pg_consume_input() functions added to manually complete
++    non-blocking reads/writes to underlying connection sockets. (Daniel Lowrey)
++
  - SQLite:
    . Updated the bundled libsqlite to the version 3.8.3.1 (Anatol)
  
diff --cc UPGRADING
index 9cfc0a642d3f520ef2bb4ed23022e02ecc6b310e,9cfc0a642d3f520ef2bb4ed23022e02ecc6b310e..0ae1d4a6ecc193cdeb5c022d4af019923794e24c
+++ b/UPGRADING
@@@ -127,6 -127,6 +127,12 @@@ PHP 5.6 UPGRADE NOTE
  - Stream crypto method specification now accepts flags instead of values
    allowing support for multiple discrete protocols in a given stream.
  
++- PostgreSQL database connections may now be established asynchronously using
++  new constants and polling functions in ext/pgsql.
++
++- Non-blocking read/write query behavior now optionally available in database
++  operations using the ext/pgsql extension.
++
  ========================================
  2. Changes in SAPI modules
  ========================================
  
  - Pgsql:
    pg_insert()/pg_select()/pg_update()/pg_delete() are no longer EXPERIMENTAL.
++  The following functions no longer block until query write completion if the
++  socket stream underlying a database connection is set to non-blocking mode:
++    . pg_send_execute()
++    . pg_send_prepare()
++    . pg_send_query()
++    . pg_send_query_params()
  
  ========================================
  5. New Functions
    Added ldap_modify_batch($link_identifier, $dn, $modifications) described in 
    https://wiki.php.net/rfc/ldap_modify_batch.
  
++- Pgsql:
++  Added pg_socket($connection) to allow async connections and non-blocking IO
++  Added pg_connect_poll($connection) for establishing async connections
++  Added pg_consume_input($connection) for non-blocking query result consumption
++  Added pg_flush($connection) for non-blocking query write completion
++
  - PDO_pgsql
    Added PDO::pgsqlGetNotify($result_type = PDO::FETCH_USE_DEFAULT, $ms_timeout = 0)
    Added PDO::pgsqlGetPid()
    - pg_select() returns PostgreSQL query resource when query is executed.
    - Added extended flag parameter for pg_meta_data(). pg_meta_data() always
      returns "is enum" attribute.
++  - The new pg_socket() function returns a socket stream with no behavior other
++    than to allow IO-readiness polling on a DB connection socket. Calling
++    stream_set_blocking() on its result enables non-blocking behavior.
++  - Passing the new PGSQL_CONNECT_ASYNC flag to pg_connect() allows applications
++    to poll for IO readiness via pg_connect_poll() and establish connections
++    asynchronously.
  
  - PDO_pgsql:
    - Added PDO::PGSQL_ATTR_DISABLE_PREPARES constant to execute the queries
  
  - Pgsql:
    PGSQL_DML_ESCAPE   int(4096)
++  PGSQL_CONNECT_ASYNC
++  PGSQL_CONNECTION_STARTED
++  PGSQL_CONNECTION_MADE
++  PGSQL_CONNECTION_AWAITING_RESPONSE
++  PGSQL_CONNECTION_AUTH_OK
++  PGSQL_CONNECTION_SSL_STARTUP
++  PGSQL_CONNECTION_SETENV
++  PGSQL_POLLING_FAILED
++  PGSQL_POLLING_READING
++  PGSQL_POLLING_WRITING
++  PGSQL_POLLING_OK
++  PGSQL_POLLING_ACTIVE
  
  - OpenSSL:
    STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT   int(9)