ildus / clickhouse_fdw

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

Postgresql push uuid field to Clickhouse data type error #62

Open kolykhalov opened 3 years ago

kolykhalov commented 3 years ago

I am trying to push data from PG-12 to Clickhouse and it gives me error:

SQL Error [HV004]: ERROR: cannot convert constant value to clickhouse value Hint: Constant value data type: 2950

Sherlocking gave me error in uuid, excepting this field passes on to data transfer. If I cast it to text it gives error, that target field is uuid not text. I am confused. Which data type casting is appropriate here or maybe what am I doing wrong here? Please advise. Thanks beforehands.

kolykhalov commented 3 years ago

As a temporary solution I converted target uuid column to text, and cast uuid to to text in PG on insert, now everything works but it is not the required solution. I would prefer to stick to native uuid rather than text.

ildus commented 3 years ago

I will need some workflow to reproduce, could you provide sql script and table definitions?