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

Add box to TypeInfoCache, fixes Issue #2746 #2747

Merged
merged 3 commits into from
Feb 3, 2023

Conversation

davecramer
Copy link
Member

Curious about

// Currently we hardcode all core types array delimiter
// to a comma. In a stock install the only exception is
// the box datatype and it's not a JDBC core type.
//

Though

@vlsi
Copy link
Member

vlsi commented Feb 2, 2023

Do you know if it is the only missing type?

@davecramer
Copy link
Member Author

Do you know if it is the only missing type?

I'll check some more.

@davecramer
Copy link
Member Author

so answering my own question

SELECT '{(3,4),(1,2);(7,8),(5,6)}'::box[]

box uses a semi-colon for the delimiter

Comment on lines 48 to 50
TypeInfo typeInfo = ((PgConnection)con).getTypeInfo();
// Previously we put didn't cache this. now we do. Remove it for the test
typeInfo.invalidate("box[]");
Copy link
Member

Choose a reason for hiding this comment

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

I incline we should create a brand new type instead of relying on invalidate.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that would be the best way to do this. I'll spend some time on that today

Copy link
Member

Choose a reason for hiding this comment

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

I suggest we make a one-line change that adds box, release 42.5, and add tests later

@davecramer davecramer merged commit 4bc9c22 into pgjdbc:release/42.5.x Feb 3, 2023
davecramer added a commit to davecramer/pgjdbc that referenced this pull request Feb 20, 2023
* Add box to TypeInfoCache, fixes Issue pgjdbc#2746

* use semi-colon delimiter for box type

* Fix: regression in PgResultSet LONG_MIN copy paste error fixes Issue pgjdbc#2748 (pgjdbc#2749)
davecramer added a commit that referenced this pull request Feb 20, 2023
* Add box to TypeInfoCache, fixes Issue #2746 (#2747)

* use semi-colon delimiter for box type

* fix: fix testGetSQLTypeQueryCache by searching for xid type. We used to search for box type but it is now cached (#2810)

fix: OidValueCorrectnessTest BOX_ARRAY OID, by adding BOX_ARRAY to the oidTypeName map
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

2 participants