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 409Waiting for connection attempt to be started. Available since PostgreSQL-17. INT2FIX(CONNECTION_ALLOCATED) 
- 
    CONNECTION_AUTH_OK =
    # File 'ext/pg.c', line 380Received authentication; waiting for backend startup. INT2FIX(CONNECTION_AUTH_OK) 
- 
    CONNECTION_AWAITING_RESPONSE =
    # File 'ext/pg.c', line 378Waiting for a response from the server. INT2FIX(CONNECTION_AWAITING_RESPONSE) 
- 
    CONNECTION_BAD =
    # File 'ext/pg.c', line 369ConnectionfailedINT2FIX(CONNECTION_BAD) 
- 
    CONNECTION_CHECK_STANDBY =
    # File 'ext/pg.c', line 405Checking if server is in standby mode. Available since PostgreSQL-14. INT2FIX(CONNECTION_CHECK_STANDBY) 
- 
    CONNECTION_CHECK_TARGET =
    # File 'ext/pg.c', line 401Checking target server properties. Available since PostgreSQL-13. INT2FIX(CONNECTION_CHECK_TARGET) 
- 
    CONNECTION_CHECK_WRITABLE =
    # File 'ext/pg.c', line 389Checking if session is read-write. Available since PostgreSQL-10. INT2FIX(CONNECTION_CHECK_WRITABLE) 
- 
    CONNECTION_CONSUME =
    # File 'ext/pg.c', line 393Consuming any extra messages. Available since PostgreSQL-10. INT2FIX(CONNECTION_CONSUME) 
- 
    CONNECTION_GSS_STARTUP =
    # File 'ext/pg.c', line 397Negotiating GSSAPI. Available since PostgreSQL-12. INT2FIX(CONNECTION_GSS_STARTUP) 
- 
    CONNECTION_MADE =
    # File 'ext/pg.c', line 376ConnectionOK; waiting to send.INT2FIX(CONNECTION_MADE) 
- 
    CONNECTION_NEEDED =
    # File 'ext/pg.c', line 386Internal state - PG.connect() needed. INT2FIX(CONNECTION_NEEDED) 
- 
    CONNECTION_OK =
    # File 'ext/pg.c', line 367ConnectionsucceededINT2FIX(CONNECTION_OK) 
- 
    CONNECTION_SETENV =
    # File 'ext/pg.c', line 382This state is no longer used. INT2FIX(CONNECTION_SETENV) 
- 
    CONNECTION_SSL_STARTUP =
    # File 'ext/pg.c', line 384Negotiating SSL encryption. INT2FIX(CONNECTION_SSL_STARTUP) 
- 
    CONNECTION_STARTED =
    # File 'ext/pg.c', line 374Waiting for connection to be made. INT2FIX(CONNECTION_STARTED) 
- 
    DEF_PGPORT =
    # File 'ext/pg.c', line 672PostgreSQL compiled in default port INT2FIX(DEF_PGPORT) 
- 
    INVALID_OID =
    # File 'ext/pg.c', line 668Invalid OID constant INT2FIX(InvalidOid) 
- 
    INV_READ =
    # File 'ext/pg.c', line 481Flag for Connection#lo_creat, Connection#lo_open – open for reading INT2FIX(INV_READ) 
- 
    INV_WRITE =
    # File 'ext/pg.c', line 479Flag for Connection#lo_creat, Connection#lo_open – open for writing INT2FIX(INV_WRITE) 
- 
    InvalidOid =
    
 # File 'ext/pg.c', line 669INT2FIX(InvalidOid) 
- 
    PGRES_BAD_RESPONSE =
    # File 'ext/pg.c', line 502Result#result_status constant - The server’s response was not understood. INT2FIX(PGRES_BAD_RESPONSE) 
- 
    PGRES_COMMAND_OK =
    # File 'ext/pg.c', line 494Result#result_status constant - Successful completion of a command returning no data. INT2FIX(PGRES_COMMAND_OK) 
- 
    PGRES_COPY_BOTH =
    # File 'ext/pg.c', line 508Result#result_status constant - Copy In/Out data transfer in progress. INT2FIX(PGRES_COPY_BOTH) 
- 
    PGRES_COPY_IN =
    # File 'ext/pg.c', line 500Result#result_status constant - Copy In (to server) data transfer started. INT2FIX(PGRES_COPY_IN) 
- 
    PGRES_COPY_OUT =
    # File 'ext/pg.c', line 498Result#result_status constant - Copy Out (from server) data transfer started. INT2FIX(PGRES_COPY_OUT) 
- 
    PGRES_EMPTY_QUERY =
    # File 'ext/pg.c', line 492Result#result_status constant - The string sent to the server was empty. INT2FIX(PGRES_EMPTY_QUERY) 
- 
    PGRES_FATAL_ERROR =
    # File 'ext/pg.c', line 506Result#result_status constant - A fatal error occurred. INT2FIX(PGRES_FATAL_ERROR) 
- 
    PGRES_NONFATAL_ERROR =
    # File 'ext/pg.c', line 504Result#result_status constant - A nonfatal error (a notice or warning) occurred. INT2FIX(PGRES_NONFATAL_ERROR) 
- 
    PGRES_PIPELINE_ABORTED =
    # File 'ext/pg.c', line 526: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 520: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 419Async connection failed or was reset INT2FIX(PGRES_POLLING_FAILED) 
- 
    PGRES_POLLING_OK =
    # File 'ext/pg.c', line 421Async connection succeeded INT2FIX(PGRES_POLLING_OK) 
- 
    PGRES_POLLING_READING =
    # File 'ext/pg.c', line 415Async connection is waiting to read INT2FIX(PGRES_POLLING_READING) 
- 
    PGRES_POLLING_WRITING =
    # File 'ext/pg.c', line 417Async connection is waiting to write INT2FIX(PGRES_POLLING_WRITING) 
- 
    PGRES_SINGLE_TUPLE =
    # File 'ext/pg.c', line 510Result#result_status constant - Single tuple from larger resultset. INT2FIX(PGRES_SINGLE_TUPLE) 
- 
    PGRES_TUPLES_CHUNK =
    # File 'ext/pg.c', line 513Result#result_status constant - tuple chunk from larger resultset. INT2FIX(PGRES_TUPLES_CHUNK) 
- 
    PGRES_TUPLES_OK =
    # File 'ext/pg.c', line 496Result#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 630Result#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 643Result#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 598Result#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 636Result#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 585Result#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 591Result#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 565an 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 572an 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 559Result#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 618Result#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 537Result#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 545Result#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 602Result#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 612Result#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 607Result#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 554Result#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 579Result#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 624Result#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 443Errorverbosity 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 455Errorverbosity 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 440Errorverbosity 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 446Errorverbosity level ( Connection#set_error_verbosity ). The VERBOSE mode includes all available fields.INT2FIX(PQERRORS_VERBOSE) 
- 
    PQPING_NO_ATTEMPT =
    # File 'ext/pg.c', line 474Connectionnot attempted (bad params).INT2FIX(PQPING_NO_ATTEMPT) 
- 
    PQPING_NO_RESPONSE =
    # File 'ext/pg.c', line 472Could not establish connection. INT2FIX(PQPING_NO_RESPONSE) 
- 
    PQPING_OK =
    # File 'ext/pg.c', line 468Server is accepting connections. INT2FIX(PQPING_OK) 
- 
    PQPING_REJECT =
    # File 'ext/pg.c', line 470Server is alive but rejecting connections. INT2FIX(PQPING_REJECT) 
- 
    PQSHOW_CONTEXT_ALWAYS =
    
    # File 'ext/pg.c', line 463    INT2FIX(PQSHOW_CONTEXT_ALWAYS) 
- 
    PQSHOW_CONTEXT_ERRORS =
    
    # File 'ext/pg.c', line 461    INT2FIX(PQSHOW_CONTEXT_ERRORS) 
- 
    PQSHOW_CONTEXT_NEVER =
    
    # File 'ext/pg.c', line 459    INT2FIX(PQSHOW_CONTEXT_NEVER) 
- 
    PQTRANS_ACTIVE =
    # File 'ext/pg.c', line 428Transaction 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 426Transaction is currently idle ( Connection#transaction_status ) INT2FIX(PQTRANS_IDLE) 
- 
    PQTRANS_INERROR =
    # File 'ext/pg.c', line 432Transaction is currently idle, in a failed transaction block ( Connection#transaction_status ) INT2FIX(PQTRANS_INERROR) 
- 
    PQTRANS_INTRANS =
    # File 'ext/pg.c', line 430Transaction is currently idle, in a valid transaction block ( Connection#transaction_status ) INT2FIX(PQTRANS_INTRANS) 
- 
    PQTRANS_UNKNOWN =
    # File 'ext/pg.c', line 434Transaction’s connection is bad ( Connection#transaction_status ) INT2FIX(PQTRANS_UNKNOWN) 
- 
    PQ_PIPELINE_ABORTED =
    # File 'ext/pg.c', line 664Connection#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 657Connection#pipeline_status constant The libpq connection is not in pipeline mode. INT2FIX(PQ_PIPELINE_OFF) 
- 
    PQ_PIPELINE_ON =
    # File 'ext/pg.c', line 651Connection#pipeline_status constant The libpq connection is in pipeline mode. INT2FIX(PQ_PIPELINE_ON) 
- 
    SEEK_CUR =
    # File 'ext/pg.c', line 485Flag for Connection#lo_lseek – seek from current position INT2FIX(SEEK_CUR) 
- 
    SEEK_END =
    # File 'ext/pg.c', line 487Flag for Connection#lo_lseek – seek from object end INT2FIX(SEEK_END) 
- 
    SEEK_SET =
    # File 'ext/pg.c', line 483Flag for Connection#lo_lseek – seek from object start INT2FIX(SEEK_SET)