diff options
author | Andrey Hristov <andrey@php.net> | 2014-04-10 16:49:13 +0300 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2014-04-10 16:49:13 +0300 |
commit | 090c3e87c0449e6eadf83815bb57c8a6eff4b56e (patch) | |
tree | 946fdc55ed17d2dc07a99b388565cc96197026dd /ext/pgsql/php_pgsql.h | |
parent | 63791d055ad64762c3f63e08ca7ad8ba1f44e0ab (diff) | |
parent | 3204ad5858a5abc50b11b8527d22c82eb07a80cc (diff) | |
download | php-git-090c3e87c0449e6eadf83815bb57c8a6eff4b56e.tar.gz |
Merge branch 'PHP-5.6' of git.php.net:php-src into PHP-5.6
Conflicts:
ext/mysqli/tests/mysqli_begin_transaction.phpt
Diffstat (limited to 'ext/pgsql/php_pgsql.h')
-rw-r--r-- | ext/pgsql/php_pgsql.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index b6caf9d201..62f20dad57 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -67,6 +67,7 @@ PHP_MINFO_FUNCTION(pgsql); /* connection functions */ PHP_FUNCTION(pg_connect); PHP_FUNCTION(pg_pconnect); +PHP_FUNCTION(pg_connect_poll); PHP_FUNCTION(pg_close); PHP_FUNCTION(pg_connection_reset); PHP_FUNCTION(pg_connection_status); @@ -134,6 +135,9 @@ PHP_FUNCTION(pg_field_is_null); PHP_FUNCTION(pg_field_table); /* async message functions */ PHP_FUNCTION(pg_get_notify); +PHP_FUNCTION(pg_socket); +PHP_FUNCTION(pg_consume_input); +PHP_FUNCTION(pg_flush); PHP_FUNCTION(pg_get_pid); /* error message functions */ PHP_FUNCTION(pg_result_error); @@ -191,6 +195,7 @@ PHP_FUNCTION(pg_select); /* connection options - ToDo: Add async connection option */ #define PGSQL_CONNECT_FORCE_NEW (1<<1) +#define PGSQL_CONNECT_ASYNC (1<<2) /* php_pgsql_convert options */ #define PGSQL_CONV_IGNORE_DEFAULT (1<<1) /* Do not use DEAFULT value by removing field from returned array */ #define PGSQL_CONV_FORCE_NULL (1<<2) /* Convert to NULL if string is null string */ @@ -222,6 +227,13 @@ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_typ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type); static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS,int entry_type); +static size_t php_pgsql_fd_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC); +static size_t php_pgsql_fd_read(php_stream *stream, char *buf, size_t count TSRMLS_DC); +static int php_pgsql_fd_close(php_stream *stream, int close_handle TSRMLS_DC); +static int php_pgsql_fd_flush(php_stream *stream TSRMLS_DC); +static int php_pgsql_fd_set_option(php_stream *stream, int option, int value, void *ptrparam TSRMLS_DC); +static int php_pgsql_fd_cast(php_stream *stream, int cast_as, void **ret TSRMLS_DC); + typedef enum _php_pgsql_data_type { /* boolean */ PG_BOOL, @@ -284,6 +296,18 @@ typedef struct _php_pgsql_notice { size_t len; } php_pgsql_notice; +static php_stream_ops php_stream_pgsql_fd_ops = { + php_pgsql_fd_write, + php_pgsql_fd_read, + php_pgsql_fd_close, + php_pgsql_fd_flush, + "PostgreSQL link", + NULL, /* seek */ + php_pgsql_fd_cast, /* cast */ + NULL, /* stat */ + php_pgsql_fd_set_option +}; + ZEND_BEGIN_MODULE_GLOBALS(pgsql) long default_link; /* default link when connection is omitted */ long num_links,num_persistent; |