Postgres range types

I’m using Debezium (and the jdbc sink) to copy changes from one postgres to another. The source table uses some of Postgres’ more exotic datatypes - particularly int8range (PostgreSQL: Documentation: 15: 8.17. Range Types).

Debezium converts an int8range into a string, making a record like this:
“schema”: {
“fields”: [{
“type”: “string”,
“optional”: false,
“field”: “range”

“payload”: {“range”: “[1,2)”}

I can get the right data type in the table schema at the sink by creating it by hand, but I can’t see any way to get the JDBC sink to cast the values in this field on insert. (It also has no way to know the type of this field, but I really just care about casting the value for now).

Has anyone tried using less-common datatypes and the jdbc sink? At the moment I think I’m going to have to write my own converter.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.