Package org.postgresql.util

# Enum PSQLState

java.lang.Object
java.lang.Enum<PSQLState>
org.postgresql.util.PSQLState

All Implemented Interfaces:
  `Serializable`, `Comparable<PSQLState>`, `java.lang.constant.Constable`

public enum PSQLState extends Enum<PSQLState>
This class is used for holding SQLState codes.

## Nested Class Summary

## Nested classes/interfaces inherited from class java.lang.Enum

`Enum.EnumDesc<E extends Enum<E>>`

## Enum Constant Summary

Enum Constants
Enum Constant
Description
`ACTIVE_SQL_TRANSACTION`
`BAD_DATETIME_FORMAT`
`CANNOT_COERCE`
`CHECK_VIOLATION`
`COMMUNICATION_ERROR`
`CONNECTION_DOES_NOT_EXIST`
`CONNECTION_FAILURE`
After a connection has been established, it went bad.
`CONNECTION_FAILURE_DURING_TRANSACTION`
`CONNECTION_REJECTED`
The server rejected our connection attempt.
`CONNECTION_UNABLE_TO_CONNECT`
We could establish a connection with the server for unknown reasons.
`DATA_ERROR`
`DATA_TYPE_MISMATCH`
`DATATYPE_MISMATCH`
`DATETIME_OVERFLOW`
`DEADLOCK_DETECTED`
`DIVISION_BY_ZERO`
`EXCLUSION_VIOLATION`
`FOREIGN_KEY_VIOLATION`
`IN_FAILED_SQL_TRANSACTION`
`INVALID_AUTHORIZATION_SPECIFICATION`
`INVALID_CURSOR_STATE`
`INVALID_NAME`
`INVALID_PARAMETER_TYPE`
`INVALID_PARAMETER_VALUE`
`INVALID_PASSWORD`
`INVALID_SAVEPOINT_SPECIFICATION`
`INVALID_SQL_STATEMENT_NAME`
`INVALID_TRANSACTION_TERMINATION`
`IO_ERROR`
`MOST_SPECIFIC_TYPE_DOES_NOT_MATCH`
`NO_ACTIVE_SQL_TRANSACTION`
`NO_DATA`
`NOT_IMPLEMENTED`
`NOT_NULL_VIOLATION`
`NUMERIC_CONSTANT_OUT_OF_RANGE`
`NUMERIC_VALUE_OUT_OF_RANGE`
`OBJECT_IN_USE`
`OBJECT_NOT_IN_STATE`
`OUT_OF_MEMORY`
`PROTOCOL_VIOLATION`
The server sent us a response the driver was not prepared for and is either bizarre datastream corruption, a driver bug, or a protocol violation on the server's part.
`QUERY_CANCELED`
`SERIALIZATION_FAILURE`
`STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL`
`STRING_DATA_RIGHT_TRUNCATION`
`SYNTAX_ERROR`
`SYSTEM_ERROR`
`TOO_MANY_RESULTS`
`TRANSACTION_STATE_INVALID`
`UNDEFINED_COLUMN`
`UNDEFINED_FUNCTION`
`UNDEFINED_OBJECT`
`UNDEFINED_TABLE`
`UNEXPECTED_ERROR`
`UNIQUE_VIOLATION`
`UNKNOWN_STATE`
`WRONG_OBJECT_TYPE`

## Method Summary

Modifier and Type
Method
Description
`String`
`getState()`
`static boolean`
`isConnectionError(@Nullable String psqlState)`
`static PSQLState`
`valueOf(String name)`
Returns the enum constant of this type with the specified name.
`static PSQLState[]`
`values()`
Returns an array containing the constants of this enum type, in the order they are declared.

### Methods inherited from class java.lang.Enum

`clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### UNKNOWN_STATE

public static final PSQLState UNKNOWN_STATE

### TOO_MANY_RESULTS

public static final PSQLState TOO_MANY_RESULTS

### NO_DATA

public static final PSQLState NO_DATA

### INVALID_PARAMETER_TYPE

public static final PSQLState INVALID_PARAMETER_TYPE

### CONNECTION_UNABLE_TO_CONNECT

public static final PSQLState CONNECTION_UNABLE_TO_CONNECT
We could establish a connection with the server for unknown reasons. Could be a network problem.

### CONNECTION_DOES_NOT_EXIST

public static final PSQLState CONNECTION_DOES_NOT_EXIST

### CONNECTION_REJECTED

public static final PSQLState CONNECTION_REJECTED
The server rejected our connection attempt. Usually an authentication failure, but could be a configuration error like asking for a SSL connection with a server that wasn't built with SSL support.

### CONNECTION_FAILURE

public static final PSQLState CONNECTION_FAILURE
After a connection has been established, it went bad.

### CONNECTION_FAILURE_DURING_TRANSACTION

public static final PSQLState CONNECTION_FAILURE_DURING_TRANSACTION

### PROTOCOL_VIOLATION

public static final PSQLState PROTOCOL_VIOLATION
The server sent us a response the driver was not prepared for and is either bizarre datastream corruption, a driver bug, or a protocol violation on the server's part.

### COMMUNICATION_ERROR

public static final PSQLState COMMUNICATION_ERROR

### NOT_IMPLEMENTED

public static final PSQLState NOT_IMPLEMENTED

### DATA_ERROR

public static final PSQLState DATA_ERROR

### STRING_DATA_RIGHT_TRUNCATION

public static final PSQLState STRING_DATA_RIGHT_TRUNCATION

### NUMERIC_VALUE_OUT_OF_RANGE

public static final PSQLState NUMERIC_VALUE_OUT_OF_RANGE

### BAD_DATETIME_FORMAT

public static final PSQLState BAD_DATETIME_FORMAT

### DATETIME_OVERFLOW

public static final PSQLState DATETIME_OVERFLOW

### DIVISION_BY_ZERO

public static final PSQLState DIVISION_BY_ZERO

### MOST_SPECIFIC_TYPE_DOES_NOT_MATCH

public static final PSQLState MOST_SPECIFIC_TYPE_DOES_NOT_MATCH

### INVALID_PARAMETER_VALUE

public static final PSQLState INVALID_PARAMETER_VALUE

### NOT_NULL_VIOLATION

public static final PSQLState NOT_NULL_VIOLATION

### FOREIGN_KEY_VIOLATION

public static final PSQLState FOREIGN_KEY_VIOLATION

### UNIQUE_VIOLATION

public static final PSQLState UNIQUE_VIOLATION

### CHECK_VIOLATION

public static final PSQLState CHECK_VIOLATION

### EXCLUSION_VIOLATION

public static final PSQLState EXCLUSION_VIOLATION

### INVALID_CURSOR_STATE

public static final PSQLState INVALID_CURSOR_STATE

### TRANSACTION_STATE_INVALID

public static final PSQLState TRANSACTION_STATE_INVALID

### ACTIVE_SQL_TRANSACTION

public static final PSQLState ACTIVE_SQL_TRANSACTION

### NO_ACTIVE_SQL_TRANSACTION

public static final PSQLState NO_ACTIVE_SQL_TRANSACTION

### IN_FAILED_SQL_TRANSACTION

public static final PSQLState IN_FAILED_SQL_TRANSACTION

### INVALID_SQL_STATEMENT_NAME

public static final PSQLState INVALID_SQL_STATEMENT_NAME

### INVALID_AUTHORIZATION_SPECIFICATION

public static final PSQLState INVALID_AUTHORIZATION_SPECIFICATION

### INVALID_PASSWORD

public static final PSQLState INVALID_PASSWORD

### INVALID_TRANSACTION_TERMINATION

public static final PSQLState INVALID_TRANSACTION_TERMINATION

### STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL

public static final PSQLState STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL

### INVALID_SAVEPOINT_SPECIFICATION

public static final PSQLState INVALID_SAVEPOINT_SPECIFICATION

### SERIALIZATION_FAILURE

public static final PSQLState SERIALIZATION_FAILURE

### DEADLOCK_DETECTED

public static final PSQLState DEADLOCK_DETECTED

### SYNTAX_ERROR

public static final PSQLState SYNTAX_ERROR

### UNDEFINED_COLUMN

public static final PSQLState UNDEFINED_COLUMN

### UNDEFINED_OBJECT

public static final PSQLState UNDEFINED_OBJECT

### WRONG_OBJECT_TYPE

public static final PSQLState WRONG_OBJECT_TYPE

### NUMERIC_CONSTANT_OUT_OF_RANGE

public static final PSQLState NUMERIC_CONSTANT_OUT_OF_RANGE

### DATA_TYPE_MISMATCH

public static final PSQLState DATA_TYPE_MISMATCH

### UNDEFINED_FUNCTION

public static final PSQLState UNDEFINED_FUNCTION

### INVALID_NAME

public static final PSQLState INVALID_NAME

### DATATYPE_MISMATCH

public static final PSQLState DATATYPE_MISMATCH

### CANNOT_COERCE

public static final PSQLState CANNOT_COERCE

### UNDEFINED_TABLE

public static final PSQLState UNDEFINED_TABLE

### OUT_OF_MEMORY

public static final PSQLState OUT_OF_MEMORY

### OBJECT_NOT_IN_STATE

public static final PSQLState OBJECT_NOT_IN_STATE

### OBJECT_IN_USE

public static final PSQLState OBJECT_IN_USE

### QUERY_CANCELED

public static final PSQLState QUERY_CANCELED

### SYSTEM_ERROR

public static final PSQLState SYSTEM_ERROR

### IO_ERROR

public static final PSQLState IO_ERROR

### UNEXPECTED_ERROR

public static final PSQLState UNEXPECTED_ERROR

## Method Details

### values

public static PSQLState[] values()
Returns an array containing the constants of this enum type, in the order they are declared.

Returns:
  an array containing the constants of this enum type, in the order they are declared

### valueOf

public static PSQLState valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
  `name` - the name of the enum constant to be returned.
Returns:
  the enum constant with the specified name
Throws:
  `IllegalArgumentException` - if this enum type has no constant with the specified name
  `NullPointerException` - if the argument is null

### getState

public String getState()

### isConnectionError

public static boolean isConnectionError(@Nullable String psqlState)