Loading...
Searching...
No Matches
Exception classes

## Classes

struct | pqxx::failure
| Run-time failure encountered by libpqxx, similar to std::runtime_error. More...
struct | pqxx::broken_connection
| Exception class for lost or failed backend connection. More...
struct | pqxx::protocol_violation
| Exception class for micommunication with the server. More...
struct | pqxx::variable_set_to_null
| The caller attempted to set a variable to null, which is not allowed. More...
class | pqxx::sql_error
| Exception class for failed queries. More...
struct | pqxx::in_doubt_error
| "Help, I don't know whether transaction was committed successfully!" More...
struct | pqxx::transaction_rollback
| The backend saw itself forced to roll back the ongoing transaction. More...
struct | pqxx::serialization_failure
| Transaction failed to serialize. Please retry it. More...
struct | pqxx::statement_completion_unknown
| We can't tell whether our last statement succeeded. More...
struct | pqxx::deadlock_detected
| The ongoing transaction has deadlocked. Retrying it may help. More...
struct | pqxx::internal_error
| Internal error in libpqxx library. More...
struct | pqxx::usage_error
| Error in usage of libpqxx library, similar to std::logic_error. More...
struct | pqxx::argument_error
| Invalid argument passed to libpqxx, similar to std::invalid_argument. More...
struct | pqxx::conversion_error
| Value conversion failed, e.g. when converting "Hello" to int. More...
struct | pqxx::unexpected_null
| Could not convert null value: target type does not support null. More...
struct | pqxx::conversion_overrun
| Could not convert value to string: not enough buffer space. More...
struct | pqxx::range_error
| Something is out of range, similar to std::out_of_range. More...
struct | pqxx::unexpected_rows
| Query returned an unexpected number of rows. More...
struct | pqxx::feature_not_supported
| Database feature not supported in current setup. More...
struct | pqxx::data_exception
| Error in data provided to SQL statement. More...
struct | pqxx::integrity_constraint_violation
struct | pqxx::restrict_violation
struct | pqxx::not_null_violation
struct | pqxx::foreign_key_violation
struct | pqxx::unique_violation
struct | pqxx::check_violation
struct | pqxx::invalid_cursor_state
struct | pqxx::invalid_sql_statement_name
struct | pqxx::invalid_cursor_name
struct | pqxx::syntax_error
struct | pqxx::undefined_column
struct | pqxx::undefined_function
struct | pqxx::undefined_table
struct | pqxx::insufficient_privilege
struct | pqxx::insufficient_resources
| Resource shortage on the server. More...
struct | pqxx::disk_full
struct | pqxx::out_of_memory
struct | pqxx::too_many_connections
struct | pqxx::plpgsql_error
| PL/pgSQL error. More...
struct | pqxx::plpgsql_raise
| Exception raised in PL/pgSQL procedure. More...
struct | pqxx::plpgsql_no_data_found
struct | pqxx::plpgsql_too_many_rows

## Detailed Description

These exception classes follow, roughly, the two-level hierarchy defined by the PostgreSQL SQLSTATE error codes (see Appendix A of the PostgreSQL documentation corresponding to your server version). This is not a complete mapping though. There are other differences as well, e.g. the error code for statement_completion_unknown has a separate status in libpqxx as in_doubt_error, and too_many_connections is classified as a broken_connection rather than a subtype of insufficient_resources.

See also
  http://www.postgresql.org/docs/9.4/interactive/errcodes-appendix.html

## Class Documentation

## pqxx::failure

struct pqxx::failure

Run-time failure encountered by libpqxx, similar to std::runtime_error.

Inheritance diagram for pqxx::failure:
[legend]
Collaboration diagram for pqxx::failure:
[legend]

### Public Member Functions

| failure (std::string const &)

#### Constructor & Destructor Documentation

## failure()

pqxx::failure::failure | ( | std::string const & | whatarg | ) |

explicit

Implementation of libpqxx exception classes.

Copyright (c) 2000-2024, Jeroen T. Vermeulen.

See COPYING for copyright license. If you did not receive a file called COPYING with this source code, please notify the distributor of this mistake, or contact the author.

## pqxx::broken_connection

struct pqxx::broken_connection

Exception class for lost or failed backend connection.

Warning
  When this happens on Unix-like systems, you may also get a SIGPIPE signal. That signal aborts the program by default, so if you wish to be able to continue after a connection breaks, be sure to disarm this signal.

If you're working on a Unix-like system, see the manual page for signal (2) on how to deal with SIGPIPE. The easiest way to make this signal harmless is to make your program ignore it:

#include <csignal>
int main()
{
std::signal(SIGPIPE, SIG_IGN);
// ...
}
Inheritance diagram for pqxx::broken_connection:
[legend]
Collaboration diagram for pqxx::broken_connection:
[legend]

### Public Member Functions

| broken_connection (std::string const &)
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::protocol_violation

struct pqxx::protocol_violation

Exception class for micommunication with the server.

This happens when the conversation between libpq and the server gets messed up. There aren't many situations where this happens, but one known instance is when you call a parameterised or prepared statement with th ewrong number of parameters.

So even though this is a broken_connection, it signals that retrying is not likely to make the problem go away.

Inheritance diagram for pqxx::protocol_violation:
[legend]
Collaboration diagram for pqxx::protocol_violation:
[legend]

### Public Member Functions

| protocol_violation (std::string const &)
Public Member Functions inherited from pqxx::broken_connection
| broken_connection (std::string const &)
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::variable_set_to_null

struct pqxx::variable_set_to_null

The caller attempted to set a variable to null, which is not allowed.

Inheritance diagram for pqxx::variable_set_to_null:
[legend]
Collaboration diagram for pqxx::variable_set_to_null:
[legend]

### Public Member Functions

| variable_set_to_null (std::string const &)
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::sql_error

class pqxx::sql_error

Exception class for failed queries.

Carries, in addition to a regular error message, a copy of the failed query and (if available) the SQLSTATE value accompanying the error.

Inheritance diagram for pqxx::sql_error:
[legend]
Collaboration diagram for pqxx::sql_error:
[legend]

### Public Member Functions

| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::in_doubt_error

struct pqxx::in_doubt_error

"Help, I don't know whether transaction was committed successfully!"

Exception that might be thrown in rare cases where the connection to the database is lost while finishing a database transaction, and there's no way of telling whether it was actually executed by the backend. In this case the database is left in an indeterminate (but consistent) state, and only manual inspection will tell which is the case.

Inheritance diagram for pqxx::in_doubt_error:
[legend]
Collaboration diagram for pqxx::in_doubt_error:
[legend]

### Public Member Functions

| in_doubt_error (std::string const &)
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::transaction_rollback

struct pqxx::transaction_rollback

The backend saw itself forced to roll back the ongoing transaction.

Inheritance diagram for pqxx::transaction_rollback:
[legend]
Collaboration diagram for pqxx::transaction_rollback:
[legend]

### Public Member Functions

| transaction_rollback (std::string const &whatarg, std::string const &q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::serialization_failure

struct pqxx::serialization_failure

Transaction failed to serialize. Please retry it.

Can only happen at transaction isolation levels REPEATABLE READ and SERIALIZABLE.

The current transaction cannot be committed without violating the guarantees made by its isolation level. This is the effect of a conflict with another ongoing transaction. The transaction may still succeed if you try to perform it again.

Inheritance diagram for pqxx::serialization_failure:
[legend]
Collaboration diagram for pqxx::serialization_failure:
[legend]

### Public Member Functions

| serialization_failure (std::string const &whatarg, std::string const &q, char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::transaction_rollback
| transaction_rollback (std::string const &whatarg, std::string const &q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::statement_completion_unknown

struct pqxx::statement_completion_unknown

We can't tell whether our last statement succeeded.

Inheritance diagram for pqxx::statement_completion_unknown:
[legend]
Collaboration diagram for pqxx::statement_completion_unknown:
[legend]

### Public Member Functions

| statement_completion_unknown (std::string const &whatarg, std::string const &q, char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::transaction_rollback
| transaction_rollback (std::string const &whatarg, std::string const &q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::deadlock_detected

struct pqxx::deadlock_detected

The ongoing transaction has deadlocked. Retrying it may help.

Inheritance diagram for pqxx::deadlock_detected:
[legend]
Collaboration diagram for pqxx::deadlock_detected:
[legend]

### Public Member Functions

| deadlock_detected (std::string const &whatarg, std::string const &q, char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::transaction_rollback
| transaction_rollback (std::string const &whatarg, std::string const &q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::internal_error

struct pqxx::internal_error

Internal error in libpqxx library.

Inheritance diagram for pqxx::internal_error:
[legend]
Collaboration diagram for pqxx::internal_error:
[legend]

### Public Member Functions

| internal_error (std::string const &)

## pqxx::usage_error

struct pqxx::usage_error

Error in usage of libpqxx library, similar to std::logic_error.

Inheritance diagram for pqxx::usage_error:
[legend]
Collaboration diagram for pqxx::usage_error:
[legend]

### Public Member Functions

| usage_error (std::string const &)

## pqxx::argument_error

struct pqxx::argument_error

Invalid argument passed to libpqxx, similar to std::invalid_argument.

Inheritance diagram for pqxx::argument_error:
[legend]
Collaboration diagram for pqxx::argument_error:
[legend]

### Public Member Functions

| argument_error (std::string const &)

## pqxx::conversion_error

struct pqxx::conversion_error

Value conversion failed, e.g. when converting "Hello" to int.

Inheritance diagram for pqxx::conversion_error:
[legend]
Collaboration diagram for pqxx::conversion_error:
[legend]

### Public Member Functions

| conversion_error (std::string const &)

## pqxx::unexpected_null

struct pqxx::unexpected_null

Could not convert null value: target type does not support null.

Inheritance diagram for pqxx::unexpected_null:
[legend]
Collaboration diagram for pqxx::unexpected_null:
[legend]

### Public Member Functions

| unexpected_null (std::string const &)
Public Member Functions inherited from pqxx::conversion_error
| conversion_error (std::string const &)

## pqxx::conversion_overrun

struct pqxx::conversion_overrun

Could not convert value to string: not enough buffer space.

Inheritance diagram for pqxx::conversion_overrun:
[legend]
Collaboration diagram for pqxx::conversion_overrun:
[legend]

### Public Member Functions

| conversion_overrun (std::string const &)
Public Member Functions inherited from pqxx::conversion_error
| conversion_error (std::string const &)

## pqxx::range_error

struct pqxx::range_error

Something is out of range, similar to std::out_of_range.

Inheritance diagram for pqxx::range_error:
[legend]
Collaboration diagram for pqxx::range_error:
[legend]

### Public Member Functions

| range_error (std::string const &)

## pqxx::unexpected_rows

struct pqxx::unexpected_rows

Query returned an unexpected number of rows.

Inheritance diagram for pqxx::unexpected_rows:
[legend]
Collaboration diagram for pqxx::unexpected_rows:
[legend]

### Public Member Functions

| unexpected_rows (std::string const &msg)
Public Member Functions inherited from pqxx::range_error
| range_error (std::string const &)

## pqxx::feature_not_supported

struct pqxx::feature_not_supported

Database feature not supported in current setup.

Inheritance diagram for pqxx::feature_not_supported:
[legend]
Collaboration diagram for pqxx::feature_not_supported:
[legend]

### Public Member Functions

| feature_not_supported (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::data_exception

struct pqxx::data_exception

Error in data provided to SQL statement.

Inheritance diagram for pqxx::data_exception:
[legend]
Collaboration diagram for pqxx::data_exception:
[legend]

### Public Member Functions

| data_exception (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::integrity_constraint_violation

struct pqxx::integrity_constraint_violation

Inheritance diagram for pqxx::integrity_constraint_violation:
[legend]
Collaboration diagram for pqxx::integrity_constraint_violation:
[legend]

### Public Member Functions

| integrity_constraint_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::restrict_violation

struct pqxx::restrict_violation

Inheritance diagram for pqxx::restrict_violation:
[legend]
Collaboration diagram for pqxx::restrict_violation:
[legend]

### Public Member Functions

| restrict_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::integrity_constraint_violation
| integrity_constraint_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::not_null_violation

struct pqxx::not_null_violation

Inheritance diagram for pqxx::not_null_violation:
[legend]
Collaboration diagram for pqxx::not_null_violation:
[legend]

### Public Member Functions

| not_null_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::integrity_constraint_violation
| integrity_constraint_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::foreign_key_violation

struct pqxx::foreign_key_violation

Inheritance diagram for pqxx::foreign_key_violation:
[legend]
Collaboration diagram for pqxx::foreign_key_violation:
[legend]

### Public Member Functions

| foreign_key_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::integrity_constraint_violation
| integrity_constraint_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::unique_violation

struct pqxx::unique_violation

Inheritance diagram for pqxx::unique_violation:
[legend]
Collaboration diagram for pqxx::unique_violation:
[legend]

### Public Member Functions

| unique_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::integrity_constraint_violation
| integrity_constraint_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::check_violation

struct pqxx::check_violation

Inheritance diagram for pqxx::check_violation:
[legend]
Collaboration diagram for pqxx::check_violation:
[legend]

### Public Member Functions

| check_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::integrity_constraint_violation
| integrity_constraint_violation (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::invalid_cursor_state

struct pqxx::invalid_cursor_state

Inheritance diagram for pqxx::invalid_cursor_state:
[legend]
Collaboration diagram for pqxx::invalid_cursor_state:
[legend]

### Public Member Functions

| invalid_cursor_state (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::invalid_sql_statement_name

struct pqxx::invalid_sql_statement_name

Inheritance diagram for pqxx::invalid_sql_statement_name:
[legend]
Collaboration diagram for pqxx::invalid_sql_statement_name:
[legend]

### Public Member Functions

| invalid_sql_statement_name (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::invalid_cursor_name

struct pqxx::invalid_cursor_name

Inheritance diagram for pqxx::invalid_cursor_name:
[legend]
Collaboration diagram for pqxx::invalid_cursor_name:
[legend]

### Public Member Functions

| invalid_cursor_name (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::syntax_error

struct pqxx::syntax_error

Inheritance diagram for pqxx::syntax_error:
[legend]
Collaboration diagram for pqxx::syntax_error:
[legend]

### Public Member Functions

| syntax_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr, int pos=-1)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

### Public Attributes

int const | error_position
| Approximate position in string where error occurred, or -1 if unknown.

## pqxx::undefined_column

struct pqxx::undefined_column

Inheritance diagram for pqxx::undefined_column:
[legend]
Collaboration diagram for pqxx::undefined_column:
[legend]

### Public Member Functions

| undefined_column (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::syntax_error
| syntax_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr, int pos=-1)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## Additional Inherited Members

Public Attributes inherited from pqxx::syntax_error
int const | error_position
| Approximate position in string where error occurred, or -1 if unknown.

## pqxx::undefined_function

struct pqxx::undefined_function

Inheritance diagram for pqxx::undefined_function:
[legend]
Collaboration diagram for pqxx::undefined_function:
[legend]

### Public Member Functions

| undefined_function (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::syntax_error
| syntax_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr, int pos=-1)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## Additional Inherited Members

Public Attributes inherited from pqxx::syntax_error
int const | error_position
| Approximate position in string where error occurred, or -1 if unknown.

## pqxx::undefined_table

struct pqxx::undefined_table

Inheritance diagram for pqxx::undefined_table:
[legend]
Collaboration diagram for pqxx::undefined_table:
[legend]

### Public Member Functions

| undefined_table (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::syntax_error
| syntax_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr, int pos=-1)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## Additional Inherited Members

Public Attributes inherited from pqxx::syntax_error
int const | error_position
| Approximate position in string where error occurred, or -1 if unknown.

## pqxx::insufficient_privilege

struct pqxx::insufficient_privilege

Inheritance diagram for pqxx::insufficient_privilege:
[legend]
Collaboration diagram for pqxx::insufficient_privilege:
[legend]

### Public Member Functions

| insufficient_privilege (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::insufficient_resources

struct pqxx::insufficient_resources

Resource shortage on the server.

Inheritance diagram for pqxx::insufficient_resources:
[legend]
Collaboration diagram for pqxx::insufficient_resources:
[legend]

### Public Member Functions

| insufficient_resources (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::disk_full

struct pqxx::disk_full

Inheritance diagram for pqxx::disk_full:
[legend]
Collaboration diagram for pqxx::disk_full:
[legend]

### Public Member Functions

| disk_full (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::insufficient_resources
| insufficient_resources (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::out_of_memory

struct pqxx::out_of_memory

Inheritance diagram for pqxx::out_of_memory:
[legend]
Collaboration diagram for pqxx::out_of_memory:
[legend]

### Public Member Functions

| out_of_memory (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::insufficient_resources
| insufficient_resources (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::too_many_connections

struct pqxx::too_many_connections

Inheritance diagram for pqxx::too_many_connections:
[legend]
Collaboration diagram for pqxx::too_many_connections:
[legend]

### Public Member Functions

| too_many_connections (std::string const &err)
Public Member Functions inherited from pqxx::broken_connection
| broken_connection (std::string const &)
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::plpgsql_error

struct pqxx::plpgsql_error

PL/pgSQL error.

Exceptions derived from this class are errors from PL/pgSQL procedures.

Inheritance diagram for pqxx::plpgsql_error:
[legend]
Collaboration diagram for pqxx::plpgsql_error:
[legend]

### Public Member Functions

| plpgsql_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::plpgsql_raise

struct pqxx::plpgsql_raise

Exception raised in PL/pgSQL procedure.

Inheritance diagram for pqxx::plpgsql_raise:
[legend]
Collaboration diagram for pqxx::plpgsql_raise:
[legend]

### Public Member Functions

| plpgsql_raise (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::plpgsql_error
| plpgsql_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::plpgsql_no_data_found

struct pqxx::plpgsql_no_data_found

Inheritance diagram for pqxx::plpgsql_no_data_found:
[legend]
Collaboration diagram for pqxx::plpgsql_no_data_found:
[legend]

### Public Member Functions

| plpgsql_no_data_found (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::plpgsql_error
| plpgsql_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)

## pqxx::plpgsql_too_many_rows

struct pqxx::plpgsql_too_many_rows

Inheritance diagram for pqxx::plpgsql_too_many_rows:
[legend]
Collaboration diagram for pqxx::plpgsql_too_many_rows:
[legend]

### Public Member Functions

| plpgsql_too_many_rows (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::plpgsql_error
| plpgsql_error (std::string const &err, std::string const &Q="", char const sqlstate[]=nullptr)
Public Member Functions inherited from pqxx::sql_error
| sql_error (std::string const &whatarg="", std::string Q="", char const *sqlstate=nullptr)
PQXX_PURE std::string const & | query () const noexcept
| The query whose execution triggered the exception.
PQXX_PURE std::string const & | sqlstate () const noexcept
| SQLSTATE error code if known, or empty string otherwise.
Public Member Functions inherited from pqxx::failure
| failure (std::string const &)