Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return correct base type for domain from getUDTs (#2520) #2522

Merged
merged 1 commit into from May 28, 2022

Conversation

alurie
Copy link
Contributor

@alurie alurie commented May 27, 2022

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

Changes to Existing Features:

  • Does this break existing behaviour? If so please explain.
  • Have you added an explanation of what your changes do and why you'd like us to include them?
    See issue Incorrect base type returned from PgDatabaseMetaData#getUDTs() #2520
  • Have you written new tests for your core changes, as applicable?
    Modified existing test cases.
  • Have you successfully run tests with your changes locally?

@davecramer davecramer merged commit 627702a into pgjdbc:master May 28, 2022
@davecramer
Copy link
Member

Thanks for the fix!

@@ -2696,7 +2696,7 @@ public ResultSet getUDTs(@Nullable String catalog, @Nullable String schemaPatter
long longTypOid = typeInfo.intOidToLong(typOid);
int sqlType = typeInfo.getSQLType(typOid);

sqlwhen.append(" when t.oid = ").append(longTypOid).append(" then ").append(sqlType);
sqlwhen.append(" when oid = ").append(longTypOid).append(" then ").append(sqlType);
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to use an alias for oid=.. condition?
The current syntax is obscure in the sense that the source of oid column is hard to tell.

Copy link
Member

Choose a reason for hiding this comment

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

I like that idea. Making the intent clear is inexpensive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vlsi, sorry just saw your suggestion.
I can add the alias and submit another PR.

@vlsi vlsi added this to the 43.4 milestone Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants