duckdb / postgres_scanner

MIT License
195 stars 35 forks source link

Support views in postgres_attach procedure #179

Closed jacques-charnay closed 4 months ago

jacques-charnay commented 4 months ago

Currently, the postgres_attach procedure allows to conveniently create DuckDB views for all tables in a given PostgreSQL schema. (with for example a syntax like CALL postgres_attach('', source_schema='analysis', sink_schema='main')). It would also be practical to automatically create DuckDB views for PostgreSQL views in the source schema. In order not to change the current behavior, taking views into account could be an optional parameter.

Mytherin commented 4 months ago

Thanks for the suggestion, however, postgres_attach is deprecated. I would suggest switching over the new ATTACH syntax which supports querying from Postgres views already.