diff --git a/reference/pgsql/functions/pg-cancel-query.xml b/reference/pgsql/functions/pg-cancel-query.xml index 6131234bff..f663308812 100644 --- a/reference/pgsql/functions/pg-cancel-query.xml +++ b/reference/pgsql/functions/pg-cancel-query.xml @@ -1,11 +1,11 @@ - + pg_cancel_query - Cancel asynchronous query + Cancel an asynchronous query @@ -16,12 +16,72 @@ resourceconnection - pg_cancel_query cancel asynchronous query sent by - pg_send_query. You cannot cancel query executed by + pg_cancel_query cancels an asynchronous query sent with + pg_send_query, pg_send_query_params + or pg_send_execute. You cannot cancel a query executed using pg_query. + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>pg_cancel_query</function> example + + +]]> + + &example.outputs; + + + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-connection-busy.xml b/reference/pgsql/functions/pg-connection-busy.xml index f29f175def..125a75f5c4 100644 --- a/reference/pgsql/functions/pg-connection-busy.xml +++ b/reference/pgsql/functions/pg-connection-busy.xml @@ -1,5 +1,5 @@ - + @@ -16,12 +16,35 @@ resourceconnection - pg_connection_busy returns &true; if the - connection is busy. If it is busy, a previous query is still executing. - If pg_get_result is called, it will be blocked. + pg_connection_busy determines whether or not a connection + is busy. If it is busy, a previous query is still executing. + If pg_get_result is used on the connection, it will be blocked. + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + + + + + &reftitle.returnvalues; + + Returns &true; if the connection is busy, &false; otherwise. + + + &reftitle.examples; diff --git a/reference/pgsql/functions/pg-connection-reset.xml b/reference/pgsql/functions/pg-connection-reset.xml index c6312a55e3..b64ece6c74 100644 --- a/reference/pgsql/functions/pg-connection-reset.xml +++ b/reference/pgsql/functions/pg-connection-reset.xml @@ -1,5 +1,5 @@ - + @@ -17,10 +17,33 @@ pg_connection_reset resets the connection. - It is useful for error recovery. &return.success; + It is useful for error recovery. + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + &reftitle.examples; diff --git a/reference/pgsql/functions/pg-connection-status.xml b/reference/pgsql/functions/pg-connection-status.xml index 66827be455..898161a33c 100644 --- a/reference/pgsql/functions/pg-connection-status.xml +++ b/reference/pgsql/functions/pg-connection-status.xml @@ -1,5 +1,5 @@ - + @@ -16,13 +16,35 @@ resourceconnection - pg_connection_status returns a connection status. - Possible statuses are PGSQL_CONNECTION_OK and - PGSQL_CONNECTION_BAD. The return value 0 as - integer indicates a valid connection. + pg_connection_status returns the status of + the specified connection. + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + + + + + &reftitle.returnvalues; + + PGSQL_CONNECTION_OK or + PGSQL_CONNECTION_BAD. + + + &reftitle.examples; diff --git a/reference/pgsql/functions/pg-copy-from.xml b/reference/pgsql/functions/pg-copy-from.xml index c18a46c1cc..ebf9be4314 100644 --- a/reference/pgsql/functions/pg-copy-from.xml +++ b/reference/pgsql/functions/pg-copy-from.xml @@ -1,5 +1,5 @@ - + @@ -20,13 +20,94 @@ stringnull_as - pg_copy_from insert records into a table from - rows. It issues COPY FROM SQL command + pg_copy_from inserts records into a table from + rows. It issues a COPY FROM SQL command internally to insert records. - &return.success; + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + table_name + + + Name of the table into which to copy the rows. + + + + + rows + + + An array of data to be copied into table_name. + Each value in rows becomes a row in table_name. + Each value in rows should be a delimited string of the values + to insert into each field. Values should be linefeed terminated. + + + + + delimiter + + + The token that separates values for each field in each element of + rows. Default is TAB. + + + + + null_as + + + How SQL NULL values are represented in the + rows. Default is \N ("\\N"). + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>pg_copy_from</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-copy-to.xml b/reference/pgsql/functions/pg-copy-to.xml index f70a831b66..6566ff6b0f 100644 --- a/reference/pgsql/functions/pg-copy-to.xml +++ b/reference/pgsql/functions/pg-copy-to.xml @@ -1,5 +1,5 @@ - + @@ -21,11 +21,82 @@ pg_copy_to copies a table to an array. It issues COPY TO SQL command internally to - retrieve records. The resulting array is returned. It returns - &false; on failure. + retrieve records. + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + table_name + + + Name of the table from which to copy the data into rows. + + + + + delimiter + + + The token that separates values for each field in each element of + rows. Default is TAB. + + + + + null_as + + + How SQL NULL values are represented in the + rows. Default is \N ("\\N"). + + + + + + + + + &reftitle.returnvalues; + + An array with one element for each line of COPY data. + It returns &false; on failure. + + + + + &reftitle.examples; + + + <function>pg_copy_to</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-result-error.xml b/reference/pgsql/functions/pg-result-error.xml index 5df1adc5ac..b8dc02b7e3 100644 --- a/reference/pgsql/functions/pg-result-error.xml +++ b/reference/pgsql/functions/pg-result-error.xml @@ -1,5 +1,5 @@ - + @@ -16,10 +16,14 @@ resourceresult - pg_result_error returns error message - associated with result resource. Therefore, - user has better chance to get better error message than - pg_last_error. + pg_result_error returns any error message + associated with the result resource. Therefore, + the user has a better chance of getting the correct error message than + with pg_last_error. + + + The function pg_result_error_field can give much greater + detail on result errors than pg_result_error. Because pg_query returns &false; if the query fails, @@ -28,10 +32,73 @@ + + &reftitle.parameters; + + + + result + + + PostgreSQL query result resource, returned by pg_query, + pg_query_params or pg_execute + (among others). + + + + + offset + + + Row to move the internal offset to in the result resource. + Rows are numbered starting from zero. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>pg_result_seek</function> example + + +]]> + + + + + &reftitle.seealso; + pg_result_error_field pg_query pg_send_query pg_get_result diff --git a/reference/pgsql/functions/pg-result-seek.xml b/reference/pgsql/functions/pg-result-seek.xml index 875bb7f5b8..bc82a9877b 100644 --- a/reference/pgsql/functions/pg-result-seek.xml +++ b/reference/pgsql/functions/pg-result-seek.xml @@ -1,5 +1,5 @@ - + @@ -10,16 +10,78 @@ &reftitle.description; - arraypg_result_seek + boolpg_result_seek resourceresult intoffset - pg_result_seek set internal row offset in - result resource. It returns &false;, if there is error. + pg_result_seek sets the internal row offset in + a result resource. + + &reftitle.parameters; + + + + result + + + PostgreSQL query result resource, returned by pg_query, + pg_query_params or pg_execute + (among others). + + + + + offset + + + Row to move the internal offset to in the result resource. + Rows are numbered starting from zero. + + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.examples; + + + <function>pg_result_seek</function> example + + +]]> + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-result-status.xml b/reference/pgsql/functions/pg-result-status.xml index 572933c4fa..ea5b775cc7 100644 --- a/reference/pgsql/functions/pg-result-status.xml +++ b/reference/pgsql/functions/pg-result-status.xml @@ -1,5 +1,5 @@ - + @@ -17,25 +17,88 @@ inttype - pg_result_status returns status of result - resource, or the command tag associated with the result. Possible values - of type are PGSQL_STATUS_LONG - or PGSQL_STATUS_STRING. The default is - PGSQL_STATUS_LONG. + pg_result_status returns the status of a result + resource, or the PostgreSQL command completion tag associated with the result + + + + &reftitle.parameters; + + + + result + + + PostgreSQL query result resource, returned by pg_query, + pg_query_params or pg_execute + (among others). + + + + + type + + + Either PGSQL_STATUS_LONG to return the numeric status + of the result, or PGSQL_STATUS_STRING + to return the command tag of the result. + If not specified, PGSQL_STATUS_LONG is the default. + + + + + + + + + &reftitle.returnvalues; Possible return values are PGSQL_EMPTY_QUERY, PGSQL_COMMAND_OK, PGSQL_TUPLES_OK, PGSQL_COPY_TO, PGSQL_COPY_FROM, PGSQL_BAD_RESPONSE, PGSQL_NONFATAL_ERROR and PGSQL_FATAL_ERROR if PGSQL_STATUS_LONG is - specified. - - - When PGSQL_STATUS_STRING is used, then the returned - value is the command completion tag from PostgreSQL. + specified. Otherwise, a string containing the PostgreSQL command tag is returned. + + + &reftitle.examples; + + + <function>pg_result_status</function> example + + +]]> + + &example.outputs; + + + + + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-send-query-params.xml b/reference/pgsql/functions/pg-send-query-params.xml index 514832722b..817b9b53bd 100644 --- a/reference/pgsql/functions/pg-send-query-params.xml +++ b/reference/pgsql/functions/pg-send-query-params.xml @@ -1,5 +1,5 @@ - + @@ -67,8 +67,10 @@ &reftitle.returnvalues; - Returns &true; on success, &false; on failure. Use pg_get_result - to determine the query result. + &return.success; + + Use pg_get_result to determine the query result. +