Module: PG::Constants
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Defined in: | ext/pg.c |
Constant Summary
-
CONNECTION_ALLOCATED =
# File 'ext/pg.c', line 405
Waiting for connection attempt to be started. Available since PostgreSQL-17.
INT2FIX(CONNECTION_ALLOCATED)
-
CONNECTION_AUTH_OK =
# File 'ext/pg.c', line 380
Received authentication; waiting for backend startup.
INT2FIX(CONNECTION_AUTH_OK)
-
CONNECTION_AWAITING_RESPONSE =
# File 'ext/pg.c', line 378
Waiting for a response from the server.
INT2FIX(CONNECTION_AWAITING_RESPONSE)
-
CONNECTION_BAD =
# File 'ext/pg.c', line 369
ConnectionfailedINT2FIX(CONNECTION_BAD)
-
CONNECTION_CHECK_STANDBY =
# File 'ext/pg.c', line 401
Checking if server is in standby mode. Available since PostgreSQL-14.
INT2FIX(CONNECTION_CHECK_STANDBY)
-
CONNECTION_CHECK_TARGET =
# File 'ext/pg.c', line 397
Checking target server properties. Available since PostgreSQL-13.
INT2FIX(CONNECTION_CHECK_TARGET)
-
CONNECTION_CHECK_WRITABLE =
# File 'ext/pg.c', line 388
Checking if session is read-write.
INT2FIX(CONNECTION_CHECK_WRITABLE)
-
CONNECTION_CONSUME =
# File 'ext/pg.c', line 390
Consuming any extra messages.
INT2FIX(CONNECTION_CONSUME)
-
CONNECTION_GSS_STARTUP =
# File 'ext/pg.c', line 393
Negotiating GSSAPI. Available since PostgreSQL-12.
INT2FIX(CONNECTION_GSS_STARTUP)
-
CONNECTION_MADE =
# File 'ext/pg.c', line 376
ConnectionOK; waiting to send.INT2FIX(CONNECTION_MADE)
-
CONNECTION_NEEDED =
# File 'ext/pg.c', line 386
Internal state - PG.connect() needed.
INT2FIX(CONNECTION_NEEDED)
-
CONNECTION_OK =
# File 'ext/pg.c', line 367
ConnectionsucceededINT2FIX(CONNECTION_OK)
-
CONNECTION_SETENV =
# File 'ext/pg.c', line 382
This state is no longer used.
INT2FIX(CONNECTION_SETENV)
-
CONNECTION_SSL_STARTUP =
# File 'ext/pg.c', line 384
Negotiating SSL encryption.
INT2FIX(CONNECTION_SSL_STARTUP)
-
CONNECTION_STARTED =
# File 'ext/pg.c', line 374
Waiting for connection to be made.
INT2FIX(CONNECTION_STARTED)
-
DEF_PGPORT =
# File 'ext/pg.c', line 668
PostgreSQL compiled in default port
INT2FIX(DEF_PGPORT)
-
INVALID_OID =
# File 'ext/pg.c', line 664
Invalid OID constant
INT2FIX(InvalidOid)
-
INV_READ =
# File 'ext/pg.c', line 477
Flag for Connection#lo_creat, Connection#lo_open -- open for reading
INT2FIX(INV_READ)
-
INV_WRITE =
# File 'ext/pg.c', line 475
Flag for Connection#lo_creat, Connection#lo_open -- open for writing
INT2FIX(INV_WRITE)
-
InvalidOid =
# File 'ext/pg.c', line 665INT2FIX(InvalidOid)
-
PGRES_BAD_RESPONSE =
# File 'ext/pg.c', line 498
Result#result_status constant - The server’s response was not understood.
INT2FIX(PGRES_BAD_RESPONSE)
-
PGRES_COMMAND_OK =
# File 'ext/pg.c', line 490
Result#result_status constant - Successful completion of a command returning no data.
INT2FIX(PGRES_COMMAND_OK)
-
PGRES_COPY_BOTH =
# File 'ext/pg.c', line 504
Result#result_status constant - Copy In/Out data transfer in progress.
INT2FIX(PGRES_COPY_BOTH)
-
PGRES_COPY_IN =
# File 'ext/pg.c', line 496
Result#result_status constant - Copy In (to server) data transfer started.
INT2FIX(PGRES_COPY_IN)
-
PGRES_COPY_OUT =
# File 'ext/pg.c', line 494
Result#result_status constant - Copy Out (from server) data transfer started.
INT2FIX(PGRES_COPY_OUT)
-
PGRES_EMPTY_QUERY =
# File 'ext/pg.c', line 488
Result#result_status constant - The string sent to the server was empty.
INT2FIX(PGRES_EMPTY_QUERY)
-
PGRES_FATAL_ERROR =
# File 'ext/pg.c', line 502
Result#result_status constant - A fatal error occurred.
INT2FIX(PGRES_FATAL_ERROR)
-
PGRES_NONFATAL_ERROR =
# File 'ext/pg.c', line 500
Result#result_status constant - A nonfatal error (a notice or warning) occurred.
INT2FIX(PGRES_NONFATAL_ERROR)
-
PGRES_PIPELINE_ABORTED =
# File 'ext/pg.c', line 522
:Resultrepresents a pipeline that has received an error from the server.Connection#get_result must be called repeatedly, and each time it will return this status code until the end of the current pipeline, at which point it will return
PG::PGRES_PIPELINE_SYNCand normal processing can resume.Result#result_status constant - The PG
-
PGRES_PIPELINE_SYNC =
# File 'ext/pg.c', line 516
:Resultrepresents a synchronization point in pipeline mode, requested by Connection#pipeline_sync.This status occurs only when pipeline mode has been selected.
Result#result_status constant - The PG
-
PGRES_POLLING_FAILED =
# File 'ext/pg.c', line 415
Async connection failed or was reset
INT2FIX(PGRES_POLLING_FAILED)
-
PGRES_POLLING_OK =
# File 'ext/pg.c', line 417
Async connection succeeded
INT2FIX(PGRES_POLLING_OK)
-
PGRES_POLLING_READING =
# File 'ext/pg.c', line 411
Async connection is waiting to read
INT2FIX(PGRES_POLLING_READING)
-
PGRES_POLLING_WRITING =
# File 'ext/pg.c', line 413
Async connection is waiting to write
INT2FIX(PGRES_POLLING_WRITING)
-
PGRES_SINGLE_TUPLE =
# File 'ext/pg.c', line 506
Result#result_status constant - Single tuple from larger resultset.
INT2FIX(PGRES_SINGLE_TUPLE)
-
PGRES_TUPLES_CHUNK =
# File 'ext/pg.c', line 509
Result#result_status constant - tuple chunk from larger resultset.
INT2FIX(PGRES_TUPLES_CHUNK)
-
PGRES_TUPLES_OK =
# File 'ext/pg.c', line 492
Result#result_status constant - Successful completion of a command returning data (such as a SELECT or SHOW).
INT2FIX(PGRES_TUPLES_OK)
-
PG_DIAG_COLUMN_NAME =
# File 'ext/pg.c', line 626
Result#result_error_field argument constant
If the error was associated with a specific table column, the name of the column. (When this field is present, the schema and table name fields identify the table.)
INT2FIX(PG_DIAG_COLUMN_NAME)
-
PG_DIAG_CONSTRAINT_NAME =
# File 'ext/pg.c', line 639
Result#result_error_field argument constant
If the error was associated with a specific constraint, the name of the constraint. The table or domain that the constraint belongs to is reported using the fields listed above. (For this purpose, indexes are treated as constraints, even if they weren't created with constraint syntax.)
INT2FIX(PG_DIAG_CONSTRAINT_NAME)
-
PG_DIAG_CONTEXT =
# File 'ext/pg.c', line 594
Result#result_error_field argument constant
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.
INT2FIX(PG_DIAG_CONTEXT)
-
PG_DIAG_DATATYPE_NAME =
# File 'ext/pg.c', line 632
Result#result_error_field argument constant
If the error was associated with a specific datatype, the name of the datatype. (When this field is present, the schema name field provides the name of the datatype's schema.)
INT2FIX(PG_DIAG_DATATYPE_NAME)
-
PG_DIAG_INTERNAL_POSITION =
# File 'ext/pg.c', line 581
Result#result_error_field argument constant
This is defined the same as the 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.
INT2FIX(PG_DIAG_INTERNAL_POSITION)
-
PG_DIAG_INTERNAL_QUERY =
# File 'ext/pg.c', line 587
Result#result_error_field argument constant
The text of a failed internally-generated command. This could be, for example, a SQL query issued by a PL/pgSQL function.
INT2FIX(PG_DIAG_INTERNAL_QUERY)
-
PG_DIAG_MESSAGE_DETAIL =
# File 'ext/pg.c', line 561
an optional secondary error message carrying more detail about the problem. Might run to multiple lines.
Result#result_error_field argument constant Detail
-
PG_DIAG_MESSAGE_HINT =
# File 'ext/pg.c', line 568
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. Might run to multiple lines.
Result#result_error_field argument constant Hint
-
PG_DIAG_MESSAGE_PRIMARY =
# File 'ext/pg.c', line 555
Result#result_error_field argument constant
The primary human-readable error message (typically one line). Always present.
INT2FIX(PG_DIAG_MESSAGE_PRIMARY)
-
PG_DIAG_SCHEMA_NAME =
# File 'ext/pg.c', line 614
Result#result_error_field argument constant
If the error was associated with a specific database object, the name of the schema containing that object, if any.
INT2FIX(PG_DIAG_SCHEMA_NAME)
-
PG_DIAG_SEVERITY =
# File 'ext/pg.c', line 533
Result#result_error_field argument constant
The severity; the field contents are 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.
INT2FIX(PG_DIAG_SEVERITY)
-
PG_DIAG_SEVERITY_NONLOCALIZED =
# File 'ext/pg.c', line 541
Result#result_error_field argument constant
The severity; the field contents are ERROR, FATAL, or PANIC (in an error message), or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message). This is identical to the PG_DIAG_SEVERITY field except that the contents are never localized.
INT2FIX(PG_DIAG_SEVERITY_NONLOCALIZED)
-
PG_DIAG_SOURCE_FILE =
# File 'ext/pg.c', line 598
Result#result_error_field argument constant
The file name of the source-code location where the error was reported.
INT2FIX(PG_DIAG_SOURCE_FILE)
-
PG_DIAG_SOURCE_FUNCTION =
# File 'ext/pg.c', line 608
Result#result_error_field argument constant
The name of the source-code function reporting the error.
INT2FIX(PG_DIAG_SOURCE_FUNCTION)
-
PG_DIAG_SOURCE_LINE =
# File 'ext/pg.c', line 603
Result#result_error_field argument constant
The line number of the source-code location where the error was reported.
INT2FIX(PG_DIAG_SOURCE_LINE)
-
PG_DIAG_SQLSTATE =
# File 'ext/pg.c', line 550
Result#result_error_field argument constant
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. For a list of the possible SQLSTATE codes, see Appendix A. This field is not localizable, and is always present.
INT2FIX(PG_DIAG_SQLSTATE)
-
PG_DIAG_STATEMENT_POSITION =
# File 'ext/pg.c', line 575
Result#result_error_field argument constant
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.
INT2FIX(PG_DIAG_STATEMENT_POSITION)
-
PG_DIAG_TABLE_NAME =
# File 'ext/pg.c', line 620
Result#result_error_field argument constant
If the error was associated with a specific table, the name of the table. (When this field is present, the schema name field provides the name of the table's schema.)
INT2FIX(PG_DIAG_TABLE_NAME)
-
PQERRORS_DEFAULT =
# File 'ext/pg.c', line 439
Errorverbosity level ( Connection#set_error_verbosity ). The DEFAULT mode produces messages that include the above plus any detail, hint, or context fields (these might span multiple lines).INT2FIX(PQERRORS_DEFAULT)
-
PQERRORS_SQLSTATE =
# File 'ext/pg.c', line 451
Errorverbosity level ( Connection#set_error_verbosity ). The SQLSTATE mode includes only the error severity and the SQLSTATE error code, if one is available (if not, the output is like TERSE mode).Available since PostgreSQL-12.
INT2FIX(PQERRORS_SQLSTATE)
-
PQERRORS_TERSE =
# File 'ext/pg.c', line 436
Errorverbosity level ( Connection#set_error_verbosity ). In TERSE mode, returned messages include severity, primary text, and position only; this will normally fit on a single line.INT2FIX(PQERRORS_TERSE)
-
PQERRORS_VERBOSE =
# File 'ext/pg.c', line 442
Errorverbosity level ( Connection#set_error_verbosity ). The VERBOSE mode includes all available fields.INT2FIX(PQERRORS_VERBOSE)
-
PQPING_NO_ATTEMPT =
# File 'ext/pg.c', line 470
Connectionnot attempted (bad params).INT2FIX(PQPING_NO_ATTEMPT)
-
PQPING_NO_RESPONSE =
# File 'ext/pg.c', line 468
Could not establish connection.
INT2FIX(PQPING_NO_RESPONSE)
-
PQPING_OK =
# File 'ext/pg.c', line 464
Server is accepting connections.
INT2FIX(PQPING_OK)
-
PQPING_REJECT =
# File 'ext/pg.c', line 466
Server is alive but rejecting connections.
INT2FIX(PQPING_REJECT)
-
PQSHOW_CONTEXT_ALWAYS =
# File 'ext/pg.c', line 459
INT2FIX(PQSHOW_CONTEXT_ALWAYS)
-
PQSHOW_CONTEXT_ERRORS =
# File 'ext/pg.c', line 457
INT2FIX(PQSHOW_CONTEXT_ERRORS)
-
PQSHOW_CONTEXT_NEVER =
# File 'ext/pg.c', line 455
INT2FIX(PQSHOW_CONTEXT_NEVER)
-
PQTRANS_ACTIVE =
# File 'ext/pg.c', line 424
Transaction is currently active; query has been sent to the server, but not yet completed. ( Connection#transaction_status )
INT2FIX(PQTRANS_ACTIVE)
-
PQTRANS_IDLE =
# File 'ext/pg.c', line 422
Transaction is currently idle ( Connection#transaction_status )
INT2FIX(PQTRANS_IDLE)
-
PQTRANS_INERROR =
# File 'ext/pg.c', line 428
Transaction is currently idle, in a failed transaction block ( Connection#transaction_status )
INT2FIX(PQTRANS_INERROR)
-
PQTRANS_INTRANS =
# File 'ext/pg.c', line 426
Transaction is currently idle, in a valid transaction block ( Connection#transaction_status )
INT2FIX(PQTRANS_INTRANS)
-
PQTRANS_UNKNOWN =
# File 'ext/pg.c', line 430
Transaction's connection is bad ( Connection#transaction_status )
INT2FIX(PQTRANS_UNKNOWN)
-
PQ_PIPELINE_ABORTED =
# File 'ext/pg.c', line 660
Connection#pipeline_status constant
The libpq connection is in pipeline mode and an error occurred while processing the current pipeline. The aborted flag is cleared when PQgetResult returns a result of type PGRES_PIPELINE_SYNC.
INT2FIX(PQ_PIPELINE_ABORTED)
-
PQ_PIPELINE_OFF =
# File 'ext/pg.c', line 653
Connection#pipeline_status constant
The libpq connection is not in pipeline mode.
INT2FIX(PQ_PIPELINE_OFF)
-
PQ_PIPELINE_ON =
# File 'ext/pg.c', line 647
Connection#pipeline_status constant
The libpq connection is in pipeline mode.
INT2FIX(PQ_PIPELINE_ON)
-
SEEK_CUR =
# File 'ext/pg.c', line 481
Flag for Connection#lo_lseek -- seek from current position
INT2FIX(SEEK_CUR)
-
SEEK_END =
# File 'ext/pg.c', line 483
Flag for Connection#lo_lseek -- seek from object end
INT2FIX(SEEK_END)
-
SEEK_SET =
# File 'ext/pg.c', line 479
Flag for Connection#lo_lseek -- seek from object start
INT2FIX(SEEK_SET)