/* {{{ proto int pg_connect([string connection_string] | [string host, string port, [string options, [string tty,]] string database)
Open a PostgreSQL connection */
-PHP_FUNCTION(pgsql_connect)
+PHP_FUNCTION(pg_connect)
{
php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0);
}
/* {{{ proto int pg_pconnect([string connection_string] | [string host, string port, [string options, [string tty,]] string database)
Open a persistent PostgreSQL connection */
-PHP_FUNCTION(pgsql_pconnect)
+PHP_FUNCTION(pg_pconnect)
{
php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
/* {{{ proto bool pg_close([int connection])
Close a PostgreSQL connection */
-PHP_FUNCTION(pgsql_close)
+PHP_FUNCTION(pg_close)
{
pval *pgsql_link;
int id,type;
/* {{{ proto string pg_dbname([int connection])
Get the database name */
-PHP_FUNCTION(pgsql_dbname)
+PHP_FUNCTION(pg_dbname)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_DBNAME);
}
/* {{{ proto string pg_errormessage([int connection])
Get the error message string */
-PHP_FUNCTION(pgsql_error_message)
+PHP_FUNCTION(pg_error_message)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_ERROR_MESSAGE);
}
/* {{{ proto string pg_options([int connection])
Get the options associated with the connection */
-PHP_FUNCTION(pgsql_options)
+PHP_FUNCTION(pg_options)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_OPTIONS);
}
/* {{{ proto int pg_port([int connection])
Return the port number associated with the connection */
-PHP_FUNCTION(pgsql_port)
+PHP_FUNCTION(pg_port)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_PORT);
}
/* {{{ proto string pg_tty([int connection])
Return the tty name associated with the connection */
-PHP_FUNCTION(pgsql_tty)
+PHP_FUNCTION(pg_tty)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_TTY);
}
/* {{{ proto string pg_host([int connection])
Returns the host name associated with the connection */
-PHP_FUNCTION(pgsql_host)
+PHP_FUNCTION(pg_host)
{
php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_HOST);
}
/* {{{ proto int pg_exec([int connection,] string query)
Execute a query */
-PHP_FUNCTION(pgsql_exec)
+PHP_FUNCTION(pg_exec)
{
pval *query,*pgsql_link;
int id,type;
/* {{{ proto int pg_numrows(int result)
Return the number of rows in the result */
-PHP_FUNCTION(pgsql_num_rows)
+PHP_FUNCTION(pg_num_rows)
{
php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_ROWS);
}
/* {{{ proto int pg_numfields(int result)
Return the number of fields in the result */
-PHP_FUNCTION(pgsql_num_fields)
+PHP_FUNCTION(pg_num_fields)
{
php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_FIELDS);
}
/* {{{ proto int pg_cmdtuples(int result)
Returns the number of affected tuples */
-PHP_FUNCTION(pgsql_cmdtuples)
+PHP_FUNCTION(pg_cmdtuples)
{
php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_CMD_TUPLES);
}
/* {{{ proto string pg_fieldname(int result, int field_number)
Returns the name of the field */
-PHP_FUNCTION(pgsql_field_name)
+PHP_FUNCTION(pg_field_name)
{
php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_NAME);
}
/* {{{ proto int pg_fieldsize(int result, int field_number)
Returns the internal size of the field */
-PHP_FUNCTION(pgsql_field_size)
+PHP_FUNCTION(pg_field_size)
{
php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_SIZE);
}
/* {{{ proto string pg_fieldtype(int result, int field_number)
Returns the type name for the given field */
-PHP_FUNCTION(pgsql_field_type)
+PHP_FUNCTION(pg_field_type)
{
php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE);
}
/* {{{ proto int pg_fieldnum(int result, string field_name)
Returns the field number of the named field */
-PHP_FUNCTION(pgsql_field_number)
+PHP_FUNCTION(pg_field_number)
{
pval *result,*field;
PGresult *pgsql_result;
/* {{{ proto mixed pg_result(int result, int row_number, mixed field_name)
Returns values from a result identifier */
-PHP_FUNCTION(pgsql_result)
+PHP_FUNCTION(pg_result)
{
pval *result, *row, *field=NULL;
PGresult *pgsql_result;
/* {{{ proto array pg_fetchrow(int result, int row)
Get a row as an enumerated array */
-PHP_FUNCTION(pgsql_fetch_row)
+PHP_FUNCTION(pg_fetch_row)
{
php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_NUM);
}
/* ?? This is a rather odd function - why not just point pg_fetcharray() directly at fetch_hash ? -RL */
/* {{{ proto array pg_fetch_array(int result, int row [, int result_type])
Fetch a row as an array */
-PHP_FUNCTION(pgsql_fetch_array)
+PHP_FUNCTION(pg_fetch_array)
{
php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* {{{ proto object pg_fetch_object(int result, int row [, int result_type])
Fetch a row as an object */
-PHP_FUNCTION(pgsql_fetch_object)
+PHP_FUNCTION(pg_fetch_object)
{
php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
if (return_value->type==IS_ARRAY) {
/* {{{ proto int pg_fieldprtlen(int result, int row, mixed field_name_or_number)
Returns the printed length */
-PHP_FUNCTION(pgsql_data_length)
+PHP_FUNCTION(pg_data_length)
{
php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_LENGTH);
}
/* {{{ proto int pg_fieldisnull(int result, int row, mixed field_name_or_number)
Test if a field is NULL */
-PHP_FUNCTION(pgsql_data_isnull)
+PHP_FUNCTION(pg_data_isnull)
{
php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_ISNULL);
}
/* {{{ proto int pg_freeresult(int result)
Free result memory */
-PHP_FUNCTION(pgsql_free_result)
+PHP_FUNCTION(pg_free_result)
{
pval *result;
pgsql_result_handle *pg_result;
/* {{{ proto int pg_getlastoid(int result)
Returns the last object identifier */
-PHP_FUNCTION(pgsql_last_oid)
+PHP_FUNCTION(pg_last_oid)
{
pval *result;
PGresult *pgsql_result;
/* {{{ proto int pg_locreate(int connection)
Create a large object */
-PHP_FUNCTION(pgsql_lo_create)
+PHP_FUNCTION(pg_lo_create)
{
pval *pgsql_link;
PGconn *pgsql;
/* {{{ proto void pg_lounlink([int connection, ] int large_obj_id)
Delete a large object */
-PHP_FUNCTION(pgsql_lo_unlink)
+PHP_FUNCTION(pg_lo_unlink)
{
pval *pgsql_link, *oid;
PGconn *pgsql;
/* {{{ proto int pg_loopen([int connection,] int objoid, string mode)
Open a large object and return fd */
-PHP_FUNCTION(pgsql_lo_open)
+PHP_FUNCTION(pg_lo_open)
{
pval *pgsql_link, *oid, *mode;
PGconn *pgsql;
/* {{{ proto void pg_loclose(int fd)
Close a large object */
-PHP_FUNCTION(pgsql_lo_close)
+PHP_FUNCTION(pg_lo_close)
{
pval *pgsql_lofp;
int id, type;
/* {{{ proto string pg_loread(int fd, int len)
Read a large object */
-PHP_FUNCTION(pgsql_lo_read)
+PHP_FUNCTION(pg_lo_read)
{
pval *pgsql_id, *len;
int id, buf_len, type, nbytes;
/* {{{ proto int pg_lowrite(int fd, string buf)
Write a large object */
-PHP_FUNCTION(pgsql_lo_write)
+PHP_FUNCTION(pg_lo_write)
{
pval *pgsql_id, *str;
int id, buf_len, nbytes, type;
/* {{{ proto void pg_loreadall(int fd)
Read a large object and send straight to browser */
-PHP_FUNCTION(pgsql_lo_readall)
+PHP_FUNCTION(pg_lo_readall)
{
pval *pgsql_id;
int i, id, tbytes, type;
PHP_MINIT_FUNCTION(pgsql);
PHP_RINIT_FUNCTION(pgsql);
-PHP_FUNCTION(pgsql_connect);
-PHP_FUNCTION(pgsql_pconnect);
-PHP_FUNCTION(pgsql_close);
-PHP_FUNCTION(pgsql_dbname);
-PHP_FUNCTION(pgsql_error_message);
-PHP_FUNCTION(pgsql_options);
-PHP_FUNCTION(pgsql_port);
-PHP_FUNCTION(pgsql_tty);
-PHP_FUNCTION(pgsql_host);
-PHP_FUNCTION(pgsql_exec);
-PHP_FUNCTION(pgsql_num_rows);
-PHP_FUNCTION(pgsql_num_fields);
-PHP_FUNCTION(pgsql_cmdtuples);
-PHP_FUNCTION(pgsql_field_name);
-PHP_FUNCTION(pgsql_field_size);
-PHP_FUNCTION(pgsql_field_type);
-PHP_FUNCTION(pgsql_field_number);
-PHP_FUNCTION(pgsql_result);
-PHP_FUNCTION(pgsql_fetch_row);
-PHP_FUNCTION(pgsql_fetch_array);
-PHP_FUNCTION(pgsql_fetch_object);
-PHP_FUNCTION(pgsql_data_length);
-PHP_FUNCTION(pgsql_data_isnull);
-PHP_FUNCTION(pgsql_free_result);
-PHP_FUNCTION(pgsql_last_oid);
-PHP_FUNCTION(pgsql_lo_create);
-PHP_FUNCTION(pgsql_lo_unlink);
-PHP_FUNCTION(pgsql_lo_open);
-PHP_FUNCTION(pgsql_lo_close);
-PHP_FUNCTION(pgsql_lo_read);
-PHP_FUNCTION(pgsql_lo_write);
-PHP_FUNCTION(pgsql_lo_readall);
+PHP_FUNCTION(pg_connect);
+PHP_FUNCTION(pg_pconnect);
+PHP_FUNCTION(pg_close);
+PHP_FUNCTION(pg_dbname);
+PHP_FUNCTION(pg_error_message);
+PHP_FUNCTION(pg_options);
+PHP_FUNCTION(pg_port);
+PHP_FUNCTION(pg_tty);
+PHP_FUNCTION(pg_host);
+PHP_FUNCTION(pg_exec);
+PHP_FUNCTION(pg_num_rows);
+PHP_FUNCTION(pg_num_fields);
+PHP_FUNCTION(pg_cmdtuples);
+PHP_FUNCTION(pg_field_name);
+PHP_FUNCTION(pg_field_size);
+PHP_FUNCTION(pg_field_type);
+PHP_FUNCTION(pg_field_number);
+PHP_FUNCTION(pg_result);
+PHP_FUNCTION(pg_fetch_row);
+PHP_FUNCTION(pg_fetch_array);
+PHP_FUNCTION(pg_fetch_object);
+PHP_FUNCTION(pg_data_length);
+PHP_FUNCTION(pg_data_isnull);
+PHP_FUNCTION(pg_free_result);
+PHP_FUNCTION(pg_last_oid);
+PHP_FUNCTION(pg_lo_create);
+PHP_FUNCTION(pg_lo_unlink);
+PHP_FUNCTION(pg_lo_open);
+PHP_FUNCTION(pg_lo_close);
+PHP_FUNCTION(pg_lo_read);
+PHP_FUNCTION(pg_lo_write);
+PHP_FUNCTION(pg_lo_readall);
void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent);
int php_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS);