r2dbc-postgresql
r2dbc-postgresql copied to clipboard
Defer oid and typarray to stage when an extension is supported
Addresses #631.
Care to elaborate what this change achieves other than delaying the lookup?
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
Thanks for the insight. I wasn't aware that oid could be missing as well.
The richest corporation in the world had 14 years time to keep up with 14 new awesome Postgres versions since 2010... but they didn't want to? At least Amazon Aurora is current these days and saves a bit of the cost 😅 https://www.postgresql.org/about/news/postgresql-17-beta-1-released-2865/
Wouldn't ClickHouse be the modern choice if OLAP has to run on AWS? 🤔 https://clickhouse.com/blog/migrating-data-between-clickhouse-postgres https://aws.amazon.com/solutions/implementations/clickhouse-cluster/
Thank you for your contribution. That's merged and backported now.