googleapis / googleapis/google-cloud-java

[java-spanner-jdbc] DatabaseMetaData returns the Cloud Spanner type names, even when used for a PostgreSQL database

Open
#12,282 0 comments 0 reactions 1 assignee Assigned to @olavloite View on GitHub
api: spanner priority: p2 type: bug
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

The `DatabaseMetaData#getTypes()` method returns the Cloud Spanner type names when it is used with a database with `PostgreSQL` dialect. This means that there is a discrepancy between the data types that the database actually supports, and what the driver reports. E.g. the driver returns type `timestamp`, which should be `timestamptz` for PostgreSQL.

The method that needs to be updated is: https://github.com/googleapis/java-spanner-jdbc/blob/9d6d3135a3e2fbc3e377f5459924ed8869498c36/src/main/java/com/google/cloud/spanner/jdbc/JdbcDatabaseMetaData.java#L920

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.