Skip to content

Version 2.10.0

Choose a tag to compare

@CaesarAugustus27 CaesarAugustus27 released this 11 Nov 21:21
· 101 commits to master since this release

Driver

Added

  • TypeDictionary.getBaseType(oid) returns the type under a domain, through every domain stacked on another, and
    the type itself for anything else.

  • PermissionDeniedException.dbDetail and hint carry the server's detail and hint, and its log block prints them.
    They were only in serverErrorMessage.

  • An anonymous ROW(...) of alternating keys and values reads into the data class asked for, each property from the
    value under its name and each value keeping its own type, with nothing registered at any depth, where it raised
    MappingException(NO_CONVERTER_FOUND).

Changed

  • A composite reads into the data class asked for with nothing registered, at any depth, where it raised
    MappingException(NO_CONVERTER_FOUND) until the class went through registerAutoComposite. Writing the class
    and reading the composite as Any still need the registration.

  • [BREAKING] PermissionDeniedException has no schema, table, column, datatype or routine. PostgreSQL
    fills none of the first four on a 42501, and routine named a C function inside the server.

  • [BREAKING] A statement the transaction does not allow where it arrived raises
    TransactionStateException(MISPLACED_STATEMENT), which replaces NO_ACTIVE_TRANSACTION and ACTIVE_TRANSACTION.
    A savepoint the transaction does not have (3B001) raises it too, where it was UncategorizedDatabaseException,
    and so do rollback(savepoint) and releaseSavepoint(savepoint) on a savepoint that no longer exists.

  • [BREAKING] JsonElement and its subclasses are read only from json, jsonb and a domain over either, where
    any value decoding to a String was parsed as JSON. JSON in a text column raises
    MappingException(NO_CONVERTER_FOUND); cast it to json/jsonb in the SQL, or read a String.

  • [BREAKING] A SELECT INTO STRICT that found no row or several is
    RoutineAssertionException(INCORRECT_RESULT_SIZE), which replaces NO_DATA_FOUND and TOO_MANY_ROWS.
    sqlState says which.

  • [BREAKING] An ERROR with a class 28 SQLSTATE is UncategorizedDatabaseException, where it was
    InitializationException(SERVER_REJECTED_CREDENTIALS). In an open session only a routine's own RAISE sends
    one; a refused login is still InitializationException.

Fixed

  • A value inside an array or a composite whose type is a domain is converted as the type under it, as a column
    already was. An enum, jsonb or a composite under a domain at that depth came back as
    MappingException(CONVERSION_ERROR), a String or a raw PgComposite. A converter's sourceType is never a
    PgType.Domain.

  • A collection, a range or a registered composite declared through withPgType as a domain over its type goes out
    declared as the domain, where it failed with MappingException(CONVERSION_ERROR), and so does a composite
    attribute over such a domain. A PgContainer built by hand goes out as the type withPgType names, where it
    ignored the name.

  • An error or a notice that carries no non-localized severity, as the ones PgBouncer writes itself do, is read with
    the severity it has, where it failed with a NullPointerException.