duckdb/duckdb-postgres

Request: make compatible with Clickhouse postgres interface

Opened this issue · 2 comments

What happens?

I've mentioned over Discord but would be great.

postgres_attach('host=localhost port=9005 dbname=default connect_timeout=10 user=default password=donthackmeplease');

Error: IO Error: Unable to query Postgres: ERROR: Query execution failed.
DB::Exception: Table default.pg_class doesn't exist
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

To Reproduce

Run a clickhouse server, which defaults postgres on port 9005. Password (made up) is donthackmeplease

Then run the postgres attach command

OS:

ubuntu

PostgreSQL Version:

Clickhouse

DuckDB Version:

7

DuckDB Client:

cli

Full Name:

Alan Kwan

Affiliation:

HKU

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree

pg_class is a fairly fundamental metadata table in Postgres. Maybe click house can simulate its existence?

Interesting, I thought about this but hesitated in case there were other metadata down the line to generate.

If it's just this table, I'll give it a shot - and post a solution here if I find one.