diff --git a/reference/pgsql/constants.xml b/reference/pgsql/constants.xml index e36bf972f0..76030a047f 100644 --- a/reference/pgsql/constants.xml +++ b/reference/pgsql/constants.xml @@ -1,5 +1,5 @@ - +
&reftitle.constants; &extension.constants; @@ -499,6 +499,42 @@ + + + PGSQL_CONV_IGNORE_DEFAULT + (integer) + + + + Passed to pg_convert. + Ignore default values in the table during conversion. + + + + + + PGSQL_CONV_FORCE_NULL + (integer) + + + + Passed to pg_convert. + Use SQL NULL in place of an empty string. + + + + + + PGSQL_CONV_IGNORE_DEFAULT + (integer) + + + + Passed to pg_convert. + Ignore conversion of &null; into SQL NOT NULL columns. + + +
diff --git a/reference/pgsql/functions/pg-convert.xml b/reference/pgsql/functions/pg-convert.xml index 4dda801f8b..c9a62cda09 100644 --- a/reference/pgsql/functions/pg-convert.xml +++ b/reference/pgsql/functions/pg-convert.xml @@ -1,5 +1,5 @@ - + @@ -31,6 +31,55 @@ &warn.experimental.func; + + &reftitle.parameters; + + + + connection + + + PostgreSQL database connection resource. + + + + + table_name + + + Name of the table against which to convert types. + + + + + assoc_array + + + Data to be converted. + + + + + options + + + Any number of PGSQL_CONV_IGNORE_DEFAULT, + PGSQL_CONV_FORCE_NULL or + PGSQL_CONV_IGNORE_NOT_NULL, combined. + + + + + + + + + &reftitle.returnvalues; + + An array of converted values, or &false; on error. + + + &reftitle.seealso; diff --git a/reference/pgsql/functions/pg-result-status.xml b/reference/pgsql/functions/pg-result-status.xml index ea5b775cc7..2d6b9cfb11 100644 --- a/reference/pgsql/functions/pg-result-status.xml +++ b/reference/pgsql/functions/pg-result-status.xml @@ -1,5 +1,5 @@ - + @@ -55,8 +55,8 @@ &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_COMMAND_OK, PGSQL_TUPLES_OK, PGSQL_COPY_OUT, + PGSQL_COPY_IN, PGSQL_BAD_RESPONSE, PGSQL_NONFATAL_ERROR and PGSQL_FATAL_ERROR if PGSQL_STATUS_LONG is specified. Otherwise, a string containing the PostgreSQL command tag is returned. @@ -81,7 +81,7 @@ $result = pg_query($conn, "COPY authors FROM STDIN;"); $status = pg_result_status($result); // Determine status -if ($status == PGSQL_COPY_FROM) +if ($status == PGSQL_COPY_IN) echo "Copy began."; else echo "Copy failed.";