1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 10:16:41 +02:00

Added several new functions to support the PostgreSQL v3 protocol

introduced in PostgreSQL 7.4.

(PHP pg_transaction_status) New function to get in-transaction status of
                            a database connection.

(PHP pg_query_params) New function to allow execution of parameterized
                      queries.

(PHP pg_prepare) New function to allow preparing named queries.

(PHP pg_execute) New function to allow execution of named prepared
                 queries.

(PHP pg_send_query_params) New function that is the async equivalent of
                           pg_query_params.

(PHP pg_send_prepare) New function that is the async equivalent of
                      pg_prepare.

(PHP pg_send_execute) New function that is the async equivalent of
                      pg_execute.

(PHP pg_result_error_field) New function that allows highly detailed
                            error information, most importantly the
                            SQLSTATE error code

# Regression tests are included for all but 2 functions, the rest will
# follow shortly.  Docs will also follow shortly.
This commit is contained in:
Christopher Kings-Lynne
2005-03-19 08:46:56 +00:00
parent 43fc6b2254
commit 1168c30635
8 changed files with 1017 additions and 2 deletions
+24
View File
@@ -75,9 +75,30 @@ PHP_FUNCTION(pg_ping);
#if HAVE_PQPARAMETERSTATUS
PHP_FUNCTION(pg_parameter_status);
#endif
#if HAVE_PGTRANSACTIONSTATUS
PHP_FUNCTION(pg_transaction_status);
#endif
/* query functions */
PHP_FUNCTION(pg_query);
#if HAVE_PQEXECPARAMS
PHP_FUNCTION(pg_query_params);
#endif
#if HAVE_PQPREPARE
PHP_FUNCTION(pg_prepare);
#endif
#if HAVE_PQEXECPREPARED
PHP_FUNCTION(pg_execute);
#endif
PHP_FUNCTION(pg_send_query);
#if HAVE_PQSENDQUERYPARAMS
PHP_FUNCTION(pg_send_query_params);
#endif
#if HAVE_PQSENDPREPARE
PHP_FUNCTION(pg_send_prepare);
#endif
#if HAVE_PQSENDQUERYPREPARED
PHP_FUNCTION(pg_send_execute);
#endif
PHP_FUNCTION(pg_cancel_query);
/* result functions */
PHP_FUNCTION(pg_fetch_assoc);
@@ -106,6 +127,9 @@ PHP_FUNCTION(pg_get_notify);
PHP_FUNCTION(pg_get_pid);
/* error message functions */
PHP_FUNCTION(pg_result_error);
#if HAVE_PQRESULTERRORFIELD
PHP_FUNCTION(pg_result_error_field);
#endif
PHP_FUNCTION(pg_last_error);
PHP_FUNCTION(pg_last_notice);
/* copy functions */