Skip to content

Version 2.14.0

Latest

Choose a tag to compare

@CaesarAugustus27 CaesarAugustus27 released this 01 Dec 18:07

Driver

Changed

  • [BREAKING] A SCRAM login refuses a server asking for more than scramMaxIterations iterations, a new property
    defaulting to 100 000, as pgjdbc does since CVE-2026-42198. A role stored under a higher scram_iterations needs the
    property raised.

  • [BREAKING] NetworkExceptionReason keeps CONNECTION_ERROR, CONNECTION_TIMEOUT and CONNECTION_CLOSED. A
    connection the server ended or closed, or whose stream broke, raises CONNECTION_ERROR with how in details on every
    call, not only the first. CONNECTION_CLOSED is left to a connection closed or aborted on the client,
    abort(executor) included. CONNECTION_ABORTED and CONNECTION_CLOSED_BY_PEER are gone.

  • [BREAKING] Writing a registered data class as its composite fails with
    MappingException(REQUIRED_ATTRIBUTE_MISSING) when the type has an attribute the class has no property for, where it
    was sent as NULL and wiped the attribute. A class meant to write NULL there needs a nullable property.

  • [BREAKING] Reading a data class reflectively fails with MappingException(REQUIRED_ATTRIBUTE_MISSING) at a
    nullable property with nothing to read it from, where it read as null. A property that may be absent needs = null.

  • [BREAKING] A CancellationException or an InterruptedException from the block of forEachRow, forEachObject
    or forEachField is rethrown as it came, where it arrived as MappingException(BLOCK_FAILED).

  • [BREAKING] Setting client_encoding to anything but UTF-8 closes the session with
    NetworkException(CONNECTION_ERROR).

  • [BREAKING] A TypeException raised while a value is converted or encoded arrives as itself, with its path,
    rather than inside a MappingException or a CodecException. A value inside an array, a composite, a ROW(...) or
    a range whose type has no codec, or one declared through withPgType as a domain over such a type, raises
    TypeException(MISSING_CODEC) naming it, as a column of it does.

  • Reading a data class whose primary constructor is private fails with a MappingException(CONVERSION_ERROR) that names
    the class and points to a converter of its own, where the message came from kotlin-reflect.

  • toDataMap() sends an empty list or set as an array of the element class its property declares, as an Array already
    went, where it needed withPgType.

Fixed

  • A private data class is read reflectively, where building one failed with MappingException(CONVERSION_ERROR).

  • A collection or an array sent as a type that is not an array fails with TypeException(NOT_A_CONTAINER), where it was
    TYPE_NOT_FOUND.

  • The @name scan and SqlScript.split end a -- comment at a lone \r, as PostgreSQL does, where they read on to
    the next \n.

  • A timestamptz or timestamp from 294247 to 294276 AD reads and writes as itself, where it read back around 290 000
    BC and failed to write.

  • A networkTimeout set while isValid() or a listener loop runs is kept, where they put back the value they had
    found.

  • close() and abort() during another thread's exchange no longer fail it with an ArrayIndexOutOfBoundsException.

  • A login is refused with InitializationException(PROTOCOL_VIOLATION) when the server sends anything but
    authentication, an error or a protocol negotiation before AuthenticationOk, as libpq does. A server that went
    straight to ReadyForQuery got past channelBinding=require.

  • Before AuthenticationOk, a message over 30 000 bytes is refused with InitializationException(PROTOCOL_VIOLATION)
    before anything is allocated for it, as libpq bounds it.

  • A message whose contents do not agree with its length word, or a DataRow that does not agree with its
    RowDescription or has none, breaks the connection with NetworkException(CONNECTION_ERROR), or fails the login
    before AuthenticationOk.

  • loginTimeout bounds the connect and the login together, as documented, where it bounded each read, so a server
    sending a byte at a time held the thread for as long as it liked.

  • A noticeHandlerClassName or oauthTokenProviderClassName naming a class of the wrong type is refused before the
    class is initialized, the hole pgjdbc closed as CVE-2022-21724.

pg-model

Changed

  • [BREAKING] The date and time serializers are named after the column they write: LocalDateAsPgDateSerializer,
    LocalDateTimeAsPgTimestampSerializer, InstantAsPgTimestamptzSerializer and LocalTimeAsPgTimeSerializer, where
    they were LocalDateWithInfinitySerializer, LocalDateTimeWithInfinitySerializer, InstantWithInfinitySerializer
    and LocalTimeWithEndOfDaySerializer. Only code that names one changes.

Migrations

Fixed

  • lockTimeout bounds only the wait for the migration lock, where the migrations ran under it too.