org.postgresql.util
Enum PSQLState

java.lang.Object
  extended by java.lang.Enum<PSQLState>
      extended by org.postgresql.util.PSQLState
All Implemented Interfaces:
Serializable, Comparable<PSQLState>

public enum PSQLState
extends Enum<PSQLState>

This class is used for holding SQLState codes.


Enum Constant Summary
ACTIVE_SQL_TRANSACTION
           
BAD_DATETIME_FORMAT
           
CANNOT_COERCE
           
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
           
DATETIME_OVERFLOW
           
DIVISION_BY_ZERO
           
IN_FAILED_SQL_TRANSACTION
           
INVALID_AUTHORIZATION_SPECIFICATION
           
INVALID_CURSOR_STATE
           
INVALID_NAME
           
INVALID_PARAMETER_TYPE
           
INVALID_PARAMETER_VALUE
           
INVALID_SAVEPOINT_SPECIFICATION
           
INVALID_SQL_STATEMENT_NAME
           
IO_ERROR
           
MOST_SPECIFIC_TYPE_DOES_NOT_MATCH
           
NO_ACTIVE_SQL_TRANSACTION
           
NO_DATA
           
NOT_IMPLEMENTED
           
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.
STATEMENT_NOT_ALLOWED_IN_FUNCTION_CALL
           
SYNTAX_ERROR
           
SYSTEM_ERROR
           
TOO_MANY_RESULTS
           
TRANSACTION_STATE_INVALID
           
UNDEFINED_COLUMN
           
UNDEFINED_FUNCTION
           
UNDEFINED_OBJECT
           
UNEXPECTED_ERROR
           
UNKNOWN_STATE
           
WRONG_OBJECT_TYPE
           
 
Method Summary
 String getState()
           
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, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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

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

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

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

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

CANNOT_COERCE

public static final PSQLState CANNOT_COERCE

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

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 Detail

values

public static PSQLState[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PSQLState c : PSQLState.values())
    System.out.println(c);

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()


Copyright © 2017 PostgreSQL Global Development Group. All rights reserved.