cwida / duckpgq-extension

DuckDB extension that adds support for SQL/PGQ
https://duckpgq.notion.site/b8ac652667964f958bfada1c3e53f1bb?v=3b47a8d44bdf4e0c8b503bf23f1b76f2
MIT License
69 stars 7 forks source link

Binder Error when selecting from non-existent relation #95

Closed dbeatty10 closed 7 months ago

dbeatty10 commented 8 months ago

What happens?

Selecting from a non-existent table gives the following error:

Error: Binder Error: Unable to find DuckPGQ Parse Data

But I expected this error instead:

Error: Catalog Error: Table with name table_that_does_not_exist does not exist!
Did you mean "temp.information_schema.tables"?
LINE 1: select * from table_that_does_not_exist;

To Reproduce

Selecting from a non-existent table gives an error:

$ ./build/release/duckdb
D select * from table_that_does_not_exist;

Output:

Error: Binder Error: Unable to find DuckPGQ Parse Data

Opening the same file with duckdb and re-running that query gives the expected error message:

$ duckdb db.db
D select * from table_that_does_not_exist;

Output:

Error: Catalog Error: Table with name table_that_does_not_exist does not exist!
Did you mean "temp.information_schema.tables"?
LINE 1: select * from table_that_does_not_exist;

Here's my version of duckdb (without the pgq extension installed):

duckdb --version

Output:

v0.10.0 20b1486d11

Environment

OS: macOS Version: duckdb-pgq v0.10.0 3e6d77b923

After following these installation instructions, here is my current version:

$ ./build/release/duckdb --version

v0.10.0 3e6d77b923
Dtenwolde commented 8 months ago

Fixed in https://github.com/cwida/duckpgq-extension/tree/95-binder-error-when-selecting-from-non-existent-relation waiting to merge

Somewhat related to #96 as select * from table_that_does_not_exist; now throws the same error where "source" gives a syntax error