jwills / buenavista

A Postgres Proxy Server in Python
Apache License 2.0
201 stars 20 forks source link

Database connection error in dbeaver #29

Open e20999 opened 3 months ago

e20999 commented 3 months ago

When I create a new database connection in dbeaver, I receive an error message: (base) C:\Users\thinkpad>python -m buenavista.examples.duckdb_postgres D:\abc.db Using DuckDB database at D:\abc.db Listening on 0.0.0.0:5433 Catalog Error: Type with name REGCLASS does not exist! Did you mean "real"? Catalog Error: Table Function with name pg_get_keywords does not exist! Did you mean "main.duckdb_keywords"? LINE 1: SELECT GROUP_CONCAT(word, ',') FROM pg_catalog.PG_GET_KEYWORDS() WHERE word... ^ Catalog Error: Type with name REGCLASS does not exist! Did you mean "real"? 微信截图_20240406102116 Please explain why this is and how it needs to be resolved? Thank you.

Mause commented 3 months ago

This sounds like an issue in Buenavista, not DuckDB

jwills commented 3 months ago

Indeed it's an issue with Buenavista-- we hack some of the postgres catalog to make it work with DuckDB, but there is still plenty of stuff that different clients want that is missing-- e.g., the regclass types. I unfortunately do not have time right now to add it in, so I'm just going to post a note that Buena Vista can be used with e.g. psql and leave it at that.

e20999 commented 3 months ago

How can I establish a connection correctly in dbeaver now?

e20999 commented 3 months ago

Using navicat also fails to connect properly, with the following error prompt: Binder Error: Referenced column "datlastsysoid" not found in FROM clause! Candidate bindings: "pg_database.oid" LINE 1: SELECT DISTINCT datlastsysoid FROM pg_database ^ Binder Error: Referenced column "datlastsysoid" not found in FROM clause! Candidate bindings: "pg_database.oid" LINE 1: SELECT DISTINCT datlastsysoid FROM pg_database

e20999 commented 3 months ago

This sounds like an issue in Buenavista, not DuckDB

yes,thank you

rzykov commented 2 months ago

@e20999 https://github.com/jwills/buenavista/commit/d99f8fcf236a1cad3bab38308feaff59866912d6 fix that