Closed ketan-mck closed 6 months ago
Thanks for the suggestion!
I have thought about adding support for a postgres_execute
function that allows you to execute arbitrary SQL within Postgres, would that work for you?
e.g.:
CALL postgres_execute('mydb', 'ALTER TABLE userdata1 SET UNLOGGED');
That would absolutely work fine, and very much in line with what I was hoping/expecting. It would not be practical for duckdb to expose every single SQL feature. Where there are gaps between the different SQL dialects, going down to native SQL would be absolutely perfect.
Implemented in https://github.com/duckdb/postgres_scanner/pull/193
I'm not sure if this is the right place for it, or if this should go to the main repo. Please advice.
I'm looking to import huge amounts of data from parquet to postgres via duckdb. This seems like the perfect tool for the job. I was looking to see if there's a way that I could use unlogged tables (Unlogged tables disable WAL to significantly improve write speeds).
I tried the following snippets to no avail:
However, it seems to simply ignore the
UNLOGGED
keyword. Is there any possibility to "escape out" to execute native postgresql? I'm happy to doALTER TABLE ... SET UNLOGGED
via native postgresql query as well.Thanks