ildus / clickhouse_fdw

ClickHouse FDW for PostgreSQL
Apache License 2.0
261 stars 55 forks source link

Could not map type <'json')> #87

Open iosifnicolae2 opened 2 years ago

iosifnicolae2 commented 2 years ago

@ildus how can i implement proper mapping for json type?

Many thanks!

EDIT I will try to add the mapping here, hope it solves the problem :) https://github.com/adjust/clickhouse_fdw/blob/fd1f3ec585b73ed61afcd3334db535e79969fb83/src/pglink.c#L735

iosifnicolae2 commented 2 years ago

I've implemented a quick fix here: https://github.com/adjust/clickhouse_fdw/pull/88 (this PR must be checked also on an instance without allow_experimental_object_type option enabled)

After merging this PR you will be able to query json fields as below:

SELECT "data.field" FROM clickhouse.unit_records;