Skip to content

Conversation

sakthivelmanii
Copy link
Contributor

@sakthivelmanii sakthivelmanii commented Oct 6, 2025

  1. Using @ListArrayType type for a character varying[] is actually converted to Postgres text type Ref.
  2. character varying[] type is not actually returning the type of elements in array which is varchar. We are exposing the type in TYPE_NAME column. Why are we adding _ to the type name? It's because PostgreSQL names array types by prepending an underscore to the base name.
  3. Similarly typeName can be from Postgres dialect equivalent.
@sakthivelmanii sakthivelmanii requested review from a team as code owners October 6, 2025 18:47
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels Oct 6, 2025
Comment on lines 31 to 44
CASE
WHEN spanner_type LIKE 'character varying[]' then '_varchar'
ELSE DATA_TYPE
END AS "TYPE_NAME",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should keep this consistent for all data types, and not only for varchar. And it should preferably align with what the PG JDBC driver returns. My assumption is that it is _varchar, and then also for example _timestamp. But what does it return for for example bigint[] / int8[] / _int8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it always returns _bigint in PG dialect.

@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Oct 9, 2025
@sakthivelmanii sakthivelmanii changed the title chore: Support text/varchar type in JDBC chore: Support PG Dialect in Hibernate Oct 9, 2025
@sakthivelmanii sakthivelmanii marked this pull request as draft October 9, 2025 11:48
@sakthivelmanii sakthivelmanii force-pushed the support_pg_dialect branch 2 times, most recently from 45c2059 to 02d584b Compare October 12, 2025 18:51
@sakthivelmanii sakthivelmanii marked this pull request as ready for review October 12, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner-jdbc API. size: m Pull request size is medium.

2 participants