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

Defer oid and typarray to stage when an extension is supported #649

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chrischall
Copy link

Addresses #631.

@mp911de
Copy link
Collaborator

mp911de commented Apr 15, 2024

Care to elaborate what this change achieves other than delaying the lookup?

@chrischall
Copy link
Author

chrischall commented Apr 16, 2024

Care to elaborate what this change achieves other than delaying the lookup?

Apologies. Our application connects to Redshift which is compatible with PostgreSQL 8.0.2. Unfortunately, that version does not have oid or typarray columns in the pg_catalog.pg_type table. There was already a fix to set the type to PostgresTypes.NO_SUCH_TYPE in the event the typarray column is missing. However, there was no similar fix for the missing oid column.

This fix handles that by only attempting to get the oid column if the BuiltinCodec is supported. For the POSTGIS_GEOMETRY codec, this relies on another library being on the classpath. So, for our application, we do not have that library on our classpath so it will not try to register that codec and will not try to get the oid column.

*edited to fix minor typo

@mp911de mp911de changed the title Only get oid and typarray when extension is supported. Defer oid and typarray to stage when an extension is supported Apr 18, 2024
@mp911de
Copy link
Collaborator

mp911de commented Apr 18, 2024

Thanks for the insight. I wasn't aware that oid could be missing as well.

@mp911de mp911de added the type: enhancement A general enhancement label Apr 18, 2024
@mp911de mp911de self-assigned this Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants