pg8000.errors — pg8000 errors

pg8000 uses the standard DBAPI 2.0 exception tree as “generic” exceptions. Generally, more specific exception types will be raised; these specific exception types will be derived from the generic exceptions.

Generic Exception Classes

exception pg8000.errors.Warning(exceptions.StandardError)
Generic exception raised for important database warnings like data truncations. This exception is not currently used by pg8000.
exception pg8000.errors.Error(exceptions.StandardError)
Generic exception that is the base exception of all other error exceptions.
exception pg8000.errors.InterfaceError(Error)
Generic exception raised for errors that are related to the database interface rather than the database itself. For example, if the interface attempts to use an SSL connection but the server refuses, an InterfaceError will be raised.
exception pg8000.errors.DatabaseError(Error)
Generic exception raised for errors that are related to the database. This exception is currently never raised by pg8000.
exception pg8000.errors.InternalError(DatabaseError)
Generic exception raised when the database encounters an internal error. This is currently only raised when unexpected state occurs in the pg8000 interface itself, and is typically the result of a interface bug.
exception pg8000.errors.OperationalError(DatabaseError)
Generic exception raised for errors that are related to the database’s operation and not necessarily under the control of the programmer. This exception is currently never raised by pg8000.
exception pg8000.errors.ProgrammingError(DatabaseError)
Generic exception raised for programming errors. For example, this exception is raised if more parameter fields are in a query string than there are available parameters.
exception pg8000.errors.IntegrityError(DatabaseError)
Generic exception raised when the relational integrity of the database is affected. This exception is not currently raised by pg8000.
exception pg8000.errors.DataError(DatabaseError)
Generic exception raised for errors that are due to problems with the processed data. This exception is not currently raised by pg8000.
exception pg8000.errors.NotSupportedError(DatabaseError)
Generic exception raised in case a method or database API was used which is not supported by the database.

Specific Exception Classes

exception pg8000.errors.ConnectionClosedError(InterfaceError)
Raised when an attempt to use a connection fails due to the connection being closed.
exception pg8000.errors.CursorClosedError(InterfaceError)
Raised when an attempt to use a cursor fails due to the cursor being closed.
exception pg8000.errors.ArrayDataParseError(InternalError)
An exception that is raised when an internal error occurs trying to decode binary array data received from the server. This shouldn’t occur unless changes to the binary wire format for arrays occur between PostgreSQL releases.
exception pg8000.errors.ArrayContentNotSupportedError(NotSupportedError)
Raised when attempting to transmit an array where the base type is not supported for binary data transfer by the interface.
exception pg8000.errors.ArrayContentNotHomogenousError(ProgrammingError)
Raised when attempting to transmit an array that doesn’t contain only a single type of object.
exception pg8000.errors.ArrayContentEmptyError(ProgrammingError)
Raised when attempting to transmit an empty array. The type oid of an empty array cannot be determined, and so sending them is not permitted.
exception pg8000.errors.ArrayDimensionsNotConsistentError(ProgrammingError)
Raised when attempting to transmit an array that has inconsistent multi-dimension sizes.
exception pg8000.errors.CopyQueryOrTableRequiredError(ProgrammingError)

Raised when copy_to() or copy_from() are called without specifying the table or query keyword parameters.

New in version 1.07.

exception pg8000.errors.CopyQueryWithoutStreamError(ProgrammingError)

Raised when execute() is used to execute a COPY ... query, rather than copy_to() or copy_from().

New in version 1.07.

exception pg8000.errors.QueryParameterIndexError(ProgrammingError)

Raised when parameters in queries can’t be matched with provided parameter values.

New in version 1.07.

exception pg8000.errors.QueryParameterParseError(ProgrammingError)

A parsing error occurred while trying to parse parameters in a query.

New in version 1.07.

Table Of Contents

Previous topic

pg8000.dbapi — DBAPI 2.0 PostgreSQL Interface

Next topic

pg8000.types — pg8000 Type Conversion Library

This Page

Quick search