postgres_scanner
postgres_scanner copied to clipboard
When querying information_schema.tables, even if the data source is a view, it is displayed as `BASE TABLE`.
What happens?
When querying information_schema.tables, even if the data source is a view, it is displayed as BASE TABLE.
To Reproduce
$ ./duckdb
v1.1.2 f680b7d08f
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
D ATTACH 'dbname=bdc_test user=... password=... host=... port=...' AS bdc_test (TYPE POSTGRES, READ_ONLY, SCHEMA 'dw');
D show all tables;
┌──────────┬─────────┬──────────────────────┬──────────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────────┐
│ database │ schema │ name │ column_names │ column_types │ temporary │
│ varchar │ varchar │ varchar │ varchar[] │ varchar[] │ boolean │
├──────────┼─────────┼──────────────────────┼──────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────────┤
│ · │ · │ · │ · │ · │ · │
│ bdc_test │ dw │ view_dim_pca_model │ [company, family, … │ [VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, INTEGER, VARCHAR, VARCHAR, INTEGER, V… │ false │
│ bdc_test │ dw │ view_model_line │ [id, model, line, … │ [INTEGER, VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR, TIMESTAMP, TIMESTAMP, VARCHAR] │ false │
│ · │ · │ · │ · │ · │ · │
├──────────┴─────────┴──────────────────────┴──────────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴───────────┤
│ 63 rows (40 shown) 6 columns │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
D SELECT * FROM information_schema.tables WHERE table_schema='dw' and table_name like 'view_%';
┌───────────────┬──────────────┬──────────────────────┬────────────┬──────────────────────┬───┬──────────────────────┬────────────────────┬──────────┬───────────────┬───────────────┐
│ table_catalog │ table_schema │ table_name │ table_type │ self_referencing_c… │ … │ user_defined_type_… │ is_insertable_into │ is_typed │ commit_action │ TABLE_COMMENT │
│ varchar │ varchar │ varchar │ varchar │ varchar │ │ varchar │ varchar │ varchar │ varchar │ varchar │
├───────────────┼──────────────┼──────────────────────┼────────────┼──────────────────────┼───┼──────────────────────┼────────────────────┼──────────┼───────────────┼───────────────┤
│ · │ · │ · │ · │ · │ · │
│ bdc_test │ dw │ view_dm_line │ BASE TABLE │ │ … │ │ YES │ NO │ │ │
│ bdc_test │ dw │ view_dim_pca_model │ BASE TABLE │ │ … │ │ YES │ NO │ │ │
│ · │ · │ · │ · │ · │ · │
├───────────────┴──────────────┴──────────────────────┴────────────┴──────────────────────┴───┴──────────────────────┴────────────────────┴──────────┴───────────────┴───────────────┤
│ 9 rows 13 columns (10 shown) │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
OS:
x86_64
DuckDB Version:
1.1.2
DuckDB Client:
Python
Hardware:
No response
Full Name:
Cobol
Affiliation:
Inventec
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have tested with a stable release
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
- [ ] Yes, I have
Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?
- [ ] Yes, I have