php-doc-en/reference/pgsql/constants.xml
2014-08-28 04:27:35 +00:00

726 lines
22 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="pgsql.constants" xmlns="http://docbook.org/ns/docbook">
&reftitle.constants;
&extension.constants;
<variablelist>
<varlistentry xml:id="constant.pgsql-libpq-version">
<term>
<constant>PGSQL_LIBPQ_VERSION</constant>
(<type>string</type>)
</term>
<listitem>
<simpara>
Short libpq version that contains only numbers and dots.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-libpq-version-str">
<term>
<constant>PGSQL_LIBPQ_VERSION_STR</constant>
(<type>string</type>)
</term>
<listitem>
<simpara>
Long libpq version that includes compiler information.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-assoc">
<term>
<constant>PGSQL_ASSOC</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_fetch_array</function>. Return an associative array of field
names and values.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-num">
<term>
<constant>PGSQL_NUM</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_fetch_array</function>. Return a numerically indexed array of field
numbers and values.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-both">
<term>
<constant>PGSQL_BOTH</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_fetch_array</function>. Return an array of field values
that is both numerically indexed (by field number) and associated (by field name).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-connect-force-new">
<term>
<constant>PGSQL_CONNECT_FORCE_NEW</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_connect</function> to force the creation of a new connection,
rather than re-using an existing identical connection.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-connect-async">
<term>
<constant>PGSQL_CONNECT_ASYNC</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_connect</function> to create an asynchronous
connection. Added in PHP 5.6.0.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-connection-bad">
<term>
<constant>PGSQL_CONNECTION_BAD</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connection_status</function> indicating that the database
connection is in an invalid state.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-connection-ok">
<term>
<constant>PGSQL_CONNECTION_OK</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connection_status</function> indicating that the database
connection is in a valid state.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-seek-set">
<term>
<constant>PGSQL_SEEK_SET</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_lo_seek</function>. Seek operation is to begin
from the start of the object.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-seek-cur">
<term>
<constant>PGSQL_SEEK_CUR</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_lo_seek</function>. Seek operation is to begin
from the current position.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-seek-end">
<term>
<constant>PGSQL_SEEK_END</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_lo_seek</function>. Seek operation is to begin
from the end of the object.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-empty-query">
<term>
<constant>PGSQL_EMPTY_QUERY</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. The string sent to the server
was empty.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-command-ok">
<term>
<constant>PGSQL_COMMAND_OK</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. Successful completion of a
command returning no data.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-tuples-ok">
<term>
<constant>PGSQL_TUPLES_OK</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. Successful completion of a command
returning data (such as a <literal>SELECT</literal> or <literal>SHOW</literal>).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-copy-out">
<term>
<constant>PGSQL_COPY_OUT</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. Copy Out (from server) data
transfer started.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-copy-in">
<term>
<constant>PGSQL_COPY_IN</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. Copy In (to server) data
transfer started.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-bad-response">
<term>
<constant>PGSQL_BAD_RESPONSE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. The server's response
was not understood.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-nonfatal-error">
<term>
<constant>PGSQL_NONFATAL_ERROR</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. A nonfatal error
(a notice or warning) occurred.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-fatal-error">
<term>
<constant>PGSQL_FATAL_ERROR</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_result_status</function>. A fatal error
occurred.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-transaction-idle">
<term>
<constant>PGSQL_TRANSACTION_IDLE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_transaction_status</function>. Connection is
currently idle, not in a transaction.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-transaction-active">
<term>
<constant>PGSQL_TRANSACTION_ACTIVE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_transaction_status</function>. A command
is in progress on the connection. A query has been sent via the connection
and not yet completed.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-transaction-intrans">
<term>
<constant>PGSQL_TRANSACTION_INTRANS</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_transaction_status</function>. The connection
is idle, in a transaction block.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-transaction-inerror">
<term>
<constant>PGSQL_TRANSACTION_INERROR</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_transaction_status</function>. The connection
is idle, in a failed transaction block.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-transaction-unknown">
<term>
<constant>PGSQL_TRANSACTION_UNKNOWN</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_transaction_status</function>. The connection
is bad.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-severity">
<term>
<constant>PGSQL_DIAG_SEVERITY</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The severity; the field contents are <literal>ERROR</literal>,
<literal>FATAL</literal>, or <literal>PANIC</literal> (in an error message), or
<literal>WARNING</literal>, <literal>NOTICE</literal>, <literal>DEBUG</literal>,
<literal>INFO</literal>, or <literal>LOG</literal> (in a notice message), or a localized
translation of one of these. Always present.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-sqlstate">
<term>
<constant>PGSQL_DIAG_SQLSTATE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The SQLSTATE code for the error. The SQLSTATE code identifies the type of error
that has occurred; it can be used by front-end applications to perform specific
operations (such as error handling) in response to a particular database error.
This field is not localizable, and is always present.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-message-primary">
<term>
<constant>PGSQL_DIAG_MESSAGE_PRIMARY</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The primary human-readable error message (typically one line). Always present.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-message-detail">
<term>
<constant>PGSQL_DIAG_MESSAGE_DETAIL</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
Detail: an optional secondary error message carrying more detail about the problem. May run to multiple lines.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-message-hint">
<term>
<constant>PGSQL_DIAG_MESSAGE_HINT</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
Hint: an optional suggestion what to do about the problem. This is intended to differ from detail in that it
offers advice (potentially inappropriate) rather than hard facts. May run to multiple lines.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-statement-position">
<term>
<constant>PGSQL_DIAG_STATEMENT_POSITION</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
A string containing a decimal integer indicating an error cursor position as an index into the original
statement string. The first character has index 1, and positions are measured in characters not bytes.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-internal-position">
<term>
<constant>PGSQL_DIAG_INTERNAL_POSITION</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
This is defined the same as the <constant>PG_DIAG_STATEMENT_POSITION</constant> field, but
it is used when the cursor position refers to an internally generated
command rather than the one submitted by the client. The
<constant>PG_DIAG_INTERNAL_QUERY</constant> field will always appear when this
field appears.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-internal-query">
<term>
<constant>PGSQL_DIAG_INTERNAL_QUERY</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The text of a failed internally-generated command. This could be, for example, a
SQL query issued by a PL/pgSQL function.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-context">
<term>
<constant>PGSQL_DIAG_CONTEXT</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
An indication of the context in which the error occurred. Presently
this includes a call stack traceback of active procedural language
functions and internally-generated queries. The trace is one entry
per line, most recent first.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-source-file">
<term>
<constant>PGSQL_DIAG_SOURCE_FILE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The file name of the PostgreSQL source-code location where the error
was reported.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-source-line">
<term>
<constant>PGSQL_DIAG_SOURCE_LINE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The line number of the PostgreSQL source-code location where the
error was reported.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-diag-source-function">
<term>
<constant>PGSQL_DIAG_SOURCE_FUNCTION</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_error_field</function>.
The name of the PostgreSQL source-code function reporting the error.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-errors-terse">
<term>
<constant>PGSQL_ERRORS_TERSE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_set_error_verbosity</function>.
Specified that returned messages include severity, primary text,
and position only; this will normally fit on a single line.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-errors-default">
<term>
<constant>PGSQL_ERRORS_DEFAULT</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_set_error_verbosity</function>.
The default mode produces messages that include the above
plus any detail, hint, or context fields (these may span
multiple lines).
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-errors-verbose">
<term>
<constant>PGSQL_ERRORS_VERBOSE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_set_error_verbosity</function>.
The verbose mode includes all available fields.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-status-long">
<term>
<constant>PGSQL_STATUS_LONG</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_status</function>. Indicates that
numerical result code is desired.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-status-string">
<term>
<constant>PGSQL_STATUS_STRING</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_result_status</function>. Indicates that
textual result command tag is desired.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-conv-ignore-default">
<term>
<constant>PGSQL_CONV_IGNORE_DEFAULT</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_convert</function>.
Ignore default values in the table during conversion.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-conv-force-null">
<term>
<constant>PGSQL_CONV_FORCE_NULL</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_convert</function>.
Use SQL <literal>NULL</literal> in place of an empty <type>string</type>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-conv-ignore-not-null">
<term>
<constant>PGSQL_CONV_IGNORE_NOT_NULL</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_convert</function>.
Ignore conversion of &null; into SQL <literal>NOT NULL</literal> columns.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-dml-no-conv">
<term>
<constant>PGSQL_DML_NO_CONV</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_insert</function>, <function>pg_select</function>,
<function>pg_update</function> and <function>pg_delete</function>.
All parameters passed as is. Manual escape is required
if parameters contain user supplied data. Use <function>pg_escape_string</function>
for it.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-dml-exec">
<term>
<constant>PGSQL_DML_EXEC</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_insert</function>, <function>pg_select</function>,
<function>pg_update</function> and <function>pg_delete</function>.
Execute query by these functions.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-dml-async">
<term>
<constant>PGSQL_DML_ASYNC</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_insert</function>, <function>pg_select</function>,
<function>pg_update</function> and <function>pg_delete</function>.
Execute asynchronous query by these functions.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-dml-string">
<term>
<constant>PGSQL_DML_STRING</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_insert</function>, <function>pg_select</function>,
<function>pg_update</function> and <function>pg_delete</function>.
Return executed query string.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-dml-escape">
<term>
<constant>PGSQL_DML_ESCAPE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Passed to <function>pg_insert</function>, <function>pg_select</function>,
<function>pg_update</function> and <function>pg_delete</function>.
Apply escape to all parameters instead of calling <function>pg_convert</function>
internally. This option omits meta data look up. Query could be as fast as
<function>pg_query</function> and <function>pg_send_query</function>.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-polling-failed">
<term>
<constant>PGSQL_POLLING_FAILED</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connect_poll</function> to indicate that the
connection attempt failed.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-polling-reading">
<term>
<constant>PGSQL_POLLING_READING</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connect_poll</function> to indicate that the
connection is waiting for the PostgreSQL socket to be readable.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-polling-writing">
<term>
<constant>PGSQL_POLLING_WRITING</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connect_poll</function> to indicate that the
connection is waiting for the PostgreSQL socket to be writable.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-polling-ok">
<term>
<constant>PGSQL_POLLING_OK</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connect_poll</function> to indicate that the
connection is ready to be used.
</simpara>
</listitem>
</varlistentry>
<varlistentry xml:id="constant.pgsql-polling-active">
<term>
<constant>PGSQL_POLLING_ACTIVE</constant>
(<type>integer</type>)
</term>
<listitem>
<simpara>
Returned by <function>pg_connect_poll</function> to indicate that the
connection is currently active.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->