The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.
PGSQL_LIBPQ_VERSION
(string)
PGSQL_LIBPQ_VERSION_STR
(string)
PGSQL_LIBPQ_VERSION
,
and using PGSQL_LIBPQ_VERSION_STR
is deprecated.
PGSQL_ASSOC
(int)
PGSQL_NUM
(int)
PGSQL_BOTH
(int)
PGSQL_CONNECT_FORCE_NEW
(int)
PGSQL_CONNECT_ASYNC
(int)
PGSQL_CONNECTION_AUTH_OK
(int)
PGSQL_CONNECTION_AWAITING_RESPONSE
(int)
PGSQL_CONNECTION_BAD
(int)
PGSQL_CONNECTION_MADE
(int)
PGSQL_CONNECTION_OK
(int)
PGSQL_CONNECTION_SETENV
(int)
PGSQL_CONNECTION_SSL_STARTUP
(int)
PGSQL_CONNECTION_STARTED
(int)
PGSQL_SEEK_SET
(int)
PGSQL_SEEK_CUR
(int)
PGSQL_SEEK_END
(int)
PGSQL_EMPTY_QUERY
(int)
PGSQL_COMMAND_OK
(int)
PGSQL_TUPLES_OK
(int)
SELECT
or SHOW
).
PGSQL_TUPLES_CHUNK
(int)
SELECT
commands when
pg_set_chunked_rows_size() is set.
The result set is divided into multiple chunks, each containing a predefined number of rows.
Available as of PHP 8.4.0 and libpq 17.
PGSQL_COPY_OUT
(int)
PGSQL_COPY_IN
(int)
PGSQL_BAD_RESPONSE
(int)
PGSQL_NONFATAL_ERROR
(int)
PGSQL_FATAL_ERROR
(int)
PGSQL_TRANSACTION_IDLE
(int)
PGSQL_TRANSACTION_ACTIVE
(int)
PGSQL_TRANSACTION_INTRANS
(int)
PGSQL_TRANSACTION_INERROR
(int)
PGSQL_TRANSACTION_UNKNOWN
(int)
PGSQL_DIAG_SEVERITY
(int)
ERROR
,
FATAL
, or PANIC
(in an error message), or
WARNING
, NOTICE
, DEBUG
,
INFO
, or LOG
(in a notice message), or a localized
translation of one of these. Always present.
PGSQL_DIAG_SQLSTATE
(int)
PGSQL_DIAG_MESSAGE_PRIMARY
(int)
PGSQL_DIAG_MESSAGE_DETAIL
(int)
PGSQL_DIAG_MESSAGE_HINT
(int)
PGSQL_DIAG_STATEMENT_POSITION
(int)
PGSQL_DIAG_INTERNAL_POSITION
(int)
PG_DIAG_STATEMENT_POSITION
field, but
it is used when the cursor position refers to an internally generated
command rather than the one submitted by the client. The
PG_DIAG_INTERNAL_QUERY
field will always appear when this
field appears.
PGSQL_DIAG_INTERNAL_QUERY
(int)
PGSQL_DIAG_CONTEXT
(int)
PGSQL_DIAG_SOURCE_FILE
(int)
PGSQL_DIAG_SOURCE_LINE
(int)
PGSQL_DIAG_SOURCE_FUNCTION
(int)
PGSQL_DIAG_SCHEMA_NAME
(int)
PGSQL_DIAG_TABLE_NAME
(int)
PGSQL_DIAG_COLUMN_NAME
(int)
PGSQL_DIAG_DATATYPE_NAME
(int)
PGSQL_DIAG_CONSTRAINT_NAME
(int)
PGSQL_ERRORS_TERSE
(int)
PGSQL_ERRORS_DEFAULT
(int)
PGSQL_ERRORS_VERBOSE
(int)
PGSQL_ERRORS_SQLSTATE
(int)
SQLSTATE
error code.
If no error code is available, the output is like
PGSQL_ERRORS_TERSE
mode.
Before PostgreSQL 11.1, the output is always the same
as in PGSQL_ERRORS_TERSE
mode.
PGSQL_NOTICE_LAST
(int)
PGSQL_NOTICE_ALL
(int)
PGSQL_NOTICE_CLEAR
(int)
PGSQL_STATUS_LONG
(int)
PGSQL_STATUS_STRING
(int)
PGSQL_CONV_IGNORE_DEFAULT
(int)
PGSQL_CONV_FORCE_NULL
(int)
NULL
in place of an empty string.
PGSQL_CONV_IGNORE_NOT_NULL
(int)
null
into SQL NOT NULL
columns.
PGSQL_DML_NO_CONV
(int)
PGSQL_DML_EXEC
(int)
PGSQL_DML_ASYNC
(int)
PGSQL_DML_STRING
(int)
PGSQL_DML_ESCAPE
(int)
PGSQL_POLLING_FAILED
(int)
PGSQL_POLLING_READING
(int)
PGSQL_POLLING_WRITING
(int)
PGSQL_POLLING_OK
(int)
PGSQL_POLLING_ACTIVE
(int)
PGSQL_DIAG_SEVERITY_NONLOCALIZED
(int)
PGSQL_SHOW_CONTEXT_NEVER
(int)
PGSQL_SHOW_CONTEXT_ERRORS
(int)
PGSQL_SHOW_CONTEXT_ALWAYS
(int)
PGSQL_TRACE_SUPPRESS_TIMESTAMPS
(int)
PGSQL_TRACE_REGRESS_MODE
(int)