Skip to content

Driver version 42.5.2 executes a query for every new connection #2746

@olavloite

Description

@olavloite

Describe the issue
Creating a new connection in version 42.5.2 will always execute the following query on a default PG installation:

SELECT pg_type.oid, typname   FROM pg_catalog.pg_type   LEFT   JOIN (select ns.oid as nspoid, ns.nspname, r.r           from pg_namespace as ns           join ( select s.r, (current_schemas(false))[s.r] as nspname                    from generate_series(1, array_upper(current_schemas(false), 1)) as s(r) ) as r          using ( nspname )        ) as sp     ON sp.nspoid = typnamespace  WHERE typname = ?  ORDER BY sp.r, pg_type.oid DESC LIMIT 1

This makes creating a new connection more expensive than in previous versions.

See cb78d0e#r99017399 for more details.

Driver Version?
42.5.2

Java Version?
open-jdk17

OS Version?
MacOS

PostgreSQL Version?
13.4

To Reproduce
Create a new JDBC connection to a standard PG server.

Expected behaviour
Creating a new connection should not automatically execute any queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions