pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: frederikz (@frederikz) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #3722: spring jdbc causes problems with uppercase db names since 42.7.5
Date: Tue, 08 Jul 2025 10:31:57 +0000
Message-ID: <[email protected]> (raw)
I'm using spring jdbc which lookups up table metadata with ``DatabaseMetaData.getTables`` and then uses the returned information to get column metadata via ``DatabaseMetaData.getColumns``.
Before 42.7.5 the table metadata returned no value for ``TABLE_CAT`` and so the query for column metadata also didn't include a catalog.
Since 42.7.5 the table metadata returns a value for ``TABLE_CAT`` e.g. ``abC``. Spring doesn't use this value directly. It queries ``DatabaseMetaData.storesLowerCaseIdentifiers`` which returns true and as it returns true ``abC`` is transformed to ``abc``. The query for column metadata is now done for a catalog with the name ``abc`` which doesn't return any value as an exact case match is done agains the current database name which is ``abC`` and not ``abc``.
I have also reported the issue to the spring team https://github.com/spring-projects/spring-framework/issues/35064 as I'm unsure which side is causing the problem.
Why does ``DatabaseMetaData.storesLowerCaseIdentifiers`` return true when database names are not treated case insensitive or if it returns true why do methods like ``DatabaseMetaData.getColumns`` not accept lowercase names for a database?
I would expect ``DatabaseMetaData.storesLowerCaseIdentifiers`` to return false or methods like ``DatabaseMetaData.getColumns`` to accecpt a lowercase database name even if the database name was created with uppercase letters.
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] issue #3722: spring jdbc causes problems with uppercase db names since 42.7.5
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox