InvalidOperationExceptionReason
Represents the specific reason for an invalid operation.
Entries
Transaction operations like commit or savepoint used when auto-commit is enabled.
A commit asked of a transaction an earlier error already aborted - by commit(), or by switching auto-commit back on, which commits. PostgreSQL would carry the COMMIT out as a ROLLBACK and report nothing, so the driver refuses it instead of sending it: the transaction stays aborted, and rolling it back is the way out, as it is for every other statement there.
Provided savepoint is invalid or belongs to another connection.
The handle being used is closed or finished - a statement, a Large Object, a COPY that has already ended. Handles are not reopened; details names the one at fault and the answer is always a new one.
An argument supplied by the caller is not acceptable - out of range, null, or unsupported. Covers negative timeouts, a null SQL string, an unknown isolation level, a PgTyped wrapping another PgTyped, a PgRecord read out of a result and handed back as a bound parameter, and the like. The offending value is named in details; there is nothing to branch on here, since no caller can react to its own bad argument at runtime.
The statement names a parameter the supplied values do not include. A @name with nothing to put there is the call being incomplete rather than the SQL being wrong, which is why it is here and not on StatementException; details names the parameter.
JDBC unwrap() failed.
The JDBC feature is not implemented by this driver.
executeUpdate or execute returned result.
The query returned a number of rows the chosen terminal forbids - a fetch*Strict that found none, or a single-row fetch that found several. The statement ran; what does not fit is the terminal picked for it, which makes this UNEXPECTED_RESULT's neighbour rather than a statement failure.
The connection is already carrying an exchange and can carry only one - a COPY still running, or a statement still being read - or, for a listener loop, a transaction still open, which holds back every notification until it ends. details says which, and what to do about it.
Properties
Functions
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.)
Returns an array containing the constants of this enum type, in the order they're declared.