下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。
PGSQL_LIBPQ_VERSION
    (string)
   PGSQL_LIBPQ_VERSION_STR
    (string)
   PGSQL_LIBPQ_VERSION
     相同,并且弃用 PGSQL_LIBPQ_VERSION_STR。
    
   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 或 SHOW)。
    
   PGSQL_TUPLES_CHUNK
    (int)
   SELECT
     命令。结果集分为多个块,每个块包含预定义的行数。自 PHP 8.4.0 和 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 或 PANIC(在 error 消息中)或
     WARNING、NOTICE、DEBUG、INFO
     或 LOG(在 notice 消息中),或其中之一的本地化翻译。始终存在。
    
   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
     字段相同,但当光标位置引用内部生成的命令(而不是客户端提交的命令)时,会使用该常量。
     当此字段出现时,PG_DIAG_INTERNAL_QUERY 字段将始终出现。
    
   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
     错误代码。如果没有可用的错误代码,则输出类似于 PGSQL_ERRORS_TERSE 模式。在 PostgreSQL 11.1
     之前,输出始终与 PGSQL_ERRORS_TERSE 模式相同。
    
   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 代替空 string。
    
   PGSQL_CONV_IGNORE_NOT_NULL
    (int)
   null 转换为 SQL NOT NULL 列。
    
   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)
   