diff --git a/functions/pgsql.xml b/functions/pgsql.xml index 6bfe39bad7..e49e340a02 100644 --- a/functions/pgsql.xml +++ b/functions/pgsql.xml @@ -1,5 +1,5 @@ - + PostgreSQL functions PostgreSQL @@ -117,13 +117,13 @@ bool pg_close - int connection + resource connection - Returns &false; if connection is not a valid connection index, &true; + Returns &false; if connection is not a valid connection resource, &true; otherwise. Closes down the connection to a PostgreSQL database - associated with the given connection index. + associated with the given connection resource. This isn't usually necessary, as non-persistent open @@ -147,7 +147,7 @@ int pg_cmdtuples - int result_id + resource result @@ -183,20 +183,20 @@ echo $cmdtuples . " cmdtuples affected."; Description - int pg_connect + resource pg_connect string host string port string dbname - int pg_connect + resource pg_connect string host string port string options string dbname - int pg_connect + resource pg_connect string host string port string options @@ -204,14 +204,14 @@ echo $cmdtuples . " cmdtuples affected."; string dbname - int pg_connect + resource pg_connect string conn_string - Returns a connection index on success, or &false; if the connection - could not be made. Opens a connection to a PostgreSQL database. - The arguments should be within a quoted string. + Returns a connection resource on success, or &false; if the + connection could not be made. Opens a connection to a PostgreSQL + database. The arguments should be within a quoted string. Using pg_connect arguments @@ -235,11 +235,11 @@ $dbconn3 = pg_Connect ("host=sheep port=5432 dbname=mary user=lamb password=baaa If a second call is made to pg_connect with the same arguments, no new connection will be established, but - instead, the connection index of the already opened connection + instead, the connection resource of the already opened connection will be returned. - This function returns a connection index that is needed by other + This function returns a connection resource that is needed by other PostgreSQL functions. You can have multiple connections open at once. @@ -266,13 +266,13 @@ $dbconn3 = pg_Connect ("host=sheep port=5432 dbname=mary user=lamb password=baaa string pg_dbname - int connection + resource connection Returns the name of the database that the given PostgreSQL - connection index is connected to, or &false; if connection is not a - valid connection index. + connection resource is connected to, or &false; if connection is not a + valid connection resource. @@ -315,7 +315,7 @@ $dbconn3 = pg_Connect ("host=sheep port=5432 dbname=mary user=lamb password=baaa string pg_errormessage - int connection + resource connection @@ -338,21 +338,21 @@ $dbconn3 = pg_Connect ("host=sheep port=5432 dbname=mary user=lamb password=baaa Description - int pg_exec - int connection + resource pg_exec + resourceconnection string query - Returns a result index if query could be executed, &false; on - failure or if connection is not a valid connection index. Details - about the error can be retrieved using the + Returns a query result resource if query could be executed, + &false; on failure or if connection is not a valid connection + index. Details about the error can be retrieved using the pg_ErrorMessage function if connection is valid. Sends an SQL statement to the PostgreSQL database specified by the connection index. The connection must be a valid index that was returned by pg_Connect. The return value of this function is an index to be used to access - the results from other PostgreSQL functions. + the results from other PostgreSQL functions. PHP/FI returned 1 if the query was not expected to return data @@ -375,7 +375,7 @@ $dbconn3 = pg_Connect ("host=sheep port=5432 dbname=mary user=lamb password=baaa array pg_fetch_array - int result + resource result int row int result_type @@ -451,7 +451,7 @@ echo $arr["author"] . " <- array\n"; object pg_fetch_object - int result + resource result int row int result_type @@ -546,7 +546,7 @@ pg_close ($db_conn); array pg_fetch_row - int result + resource result int row @@ -612,7 +612,7 @@ for ($i=0; $i < $num; $i++) { int pg_fieldisnull - int result_id + resource result int row mixed field @@ -636,7 +636,7 @@ for ($i=0; $i < $num; $i++) { string pg_fieldname - int result_id + resource result int field_number @@ -658,7 +658,7 @@ for ($i=0; $i < $num; $i++) { int pg_fieldnum - int result_id + resource result string field_name @@ -681,7 +681,7 @@ for ($i=0; $i < $num; $i++) { int pg_fieldprtlen - int result_id + resource result int row_number string field_name @@ -707,7 +707,7 @@ for ($i=0; $i < $num; $i++) { int pg_fieldsize - int result_id + resource result int field_number @@ -733,7 +733,7 @@ for ($i=0; $i < $num; $i++) { string pg_fieldtype - int result_id + resource result int field_number @@ -754,8 +754,8 @@ for ($i=0; $i < $num; $i++) { Description - int pg_freeresult - int result_id + bool pg_freeresult + resource result @@ -780,7 +780,7 @@ for ($i=0; $i < $num; $i++) { int pg_getlastoid - int result_id + resource result @@ -807,7 +807,7 @@ for ($i=0; $i < $num; $i++) { string pg_host - int connection_id + resource connection @@ -826,13 +826,13 @@ for ($i=0; $i < $num; $i++) { Description - void pg_loclose - int fd + bool pg_loclose + resource large_object pg_loclose closes an Inversion Large - Object. Fd is a file descriptor for the + Object. large_object is a resource for the large object from pg_loopen. @@ -848,13 +848,13 @@ for ($i=0; $i < $num; $i++) { int pg_locreate - int conn + resource connection pg_locreate creates an Inversion Large Object and returns the oid of the large - object. conn specifies a valid database + object. connection specifies a valid database connection. PostgreSQL access modes INV_READ, INV_WRITE, and INV_ARCHIVE are not supported, the object is created always with both read and write access. INV_ARCHIVE has been removed from @@ -876,11 +876,11 @@ for ($i=0; $i < $num; $i++) { int oid - int - file + string + filename - int - connection_id + resource + connection @@ -905,8 +905,8 @@ for ($i=0; $i < $num; $i++) { int pg_loimport - int - file + string + filename int connection_id @@ -933,8 +933,8 @@ for ($i=0; $i < $num; $i++) { Description - int pg_loopen - int conn + bool pg_loopen + resource connection int objoid string mode @@ -945,7 +945,8 @@ for ($i=0; $i < $num; $i++) { encapsulates information about the connection. Do not close the connection before closing the large object file descriptor. objoid specifies a valid large object oid - and mode can be either "r", "w", or "rw". + and mode can be either "r", "w", or + "rw". It returns &false; if there is error. @@ -960,17 +961,16 @@ for ($i=0; $i < $num; $i++) { string pg_loread - int fd + resource large_object int len pg_loread reads at most - len bytes from a large object and - returns it as a string. - fd specifies a valid large object file - descriptor andlen specifies the maximum - allowable size of the large object segment. + len bytes from a large object and returns + it as a string. large_object specifies a + valid large object resource andlen + specifies the maximum allowable size of the large object segment. @@ -987,7 +987,7 @@ for ($i=0; $i < $num; $i++) { void pg_loreadall - int fd + resource large_object @@ -1008,13 +1008,13 @@ for ($i=0; $i < $num; $i++) { void pg_lounlink - int conn - int lobjid + resource connection + resource large_object pg_lounlink deletes a large object with the - lobjid identifier for that large object. + large_object identifier for that large object. @@ -1029,7 +1029,7 @@ for ($i=0; $i < $num; $i++) { int pg_lowrite - int fd + resource large_object string buf @@ -1037,8 +1037,9 @@ for ($i=0; $i < $num; $i++) { pg_lowrite writes at most to a large object from a variable buf and returns the number of bytes actually written, or &false; in the case of an error. - fd is a file descriptor for the large - object from pg_loopen. + large_object is a large object resource + from pg_loopen. It returns &false; if there + is error. @@ -1053,7 +1054,7 @@ for ($i=0; $i < $num; $i++) { int pg_numfields - int result_id + resource result @@ -1079,7 +1080,7 @@ for ($i=0; $i < $num; $i++) { int pg_numrows - int result_id + resource result @@ -1105,7 +1106,7 @@ for ($i=0; $i < $num; $i++) { string pg_options - int connection_id + resource connection @@ -1130,18 +1131,18 @@ for ($i=0; $i < $num; $i++) { - Returns a connection index on success, or &false; if the connection - could not be made. Opens a connection to a PostgreSQL database. - The arguments should be within a quoted string. - The arguments available include host, + Returns a connection resource on success, or &false; if the + connection could not be made. Opens a connection to a PostgreSQL + database. The arguments should be within a quoted string. The + arguments available include host, port, tty, options, dbname, user, and password. - This function returns a connection index that is needed by other - PostgreSQL functions. You can have multiple connections open at - once. + This function returns a connection resource that is needed by + other PostgreSQL functions. You can have multiple connections + open at once. The previous syntax of: @@ -1168,12 +1169,12 @@ for ($i=0; $i < $num; $i++) { int pg_port - int connection_id + resource connection pg_port will return the port number that the - given PostgreSQL connection identifier is connected to. + given PostgreSQL connection resource is connected to. @@ -1189,7 +1190,7 @@ for ($i=0; $i < $num; $i++) { bool pg_put_line resource - connection_id + connection string data @@ -1241,7 +1242,7 @@ for ($i=0; $i < $num; $i++) { mixed pg_result - int result_id + resource result int row_number mixed fieldname @@ -1282,7 +1283,7 @@ for ($i=0; $i < $num; $i++) { int pg_set_client_encoding - int + resource connection string encoding @@ -1327,7 +1328,7 @@ for ($i=0; $i < $num; $i++) { string pg_client_encoding - int + resource connection @@ -1371,7 +1372,7 @@ for ($i=0; $i < $num; $i++) { string mode - int + resource connection @@ -1415,13 +1416,13 @@ for ($i=0; $i < $num; $i++) { string pg_tty - int connection_id + resource connection pg_tty will return the tty name that server side debugging output is sent to on the given PostgreSQL - connection identifier. + connection resource. @@ -1436,7 +1437,7 @@ for ($i=0; $i < $num; $i++) { bool pg_untrace - int + resource connection