[Feature Request] Add possibility to run "low level" queries directly via psql driver
Closed this issue · 3 comments
What happens?
As suggested here: duckdb/duckdb#6223 (comment) i am opening a Feature Request issue in this repo (this is not a real bug report).
Use case:
- i need to perform some action when a Large table changes in postgres
- i could do it via NOTIFY/LISTEN or by enabling commit_timestamps ( https://dba.stackexchange.com/questions/58214/getting-last-modification-date-of-a-postgresql-database-table)
- i went for the second alternative given that i dont think duckdb implements NOTIFY/LISTEN functions
- i run SELECT pg_xact_commit_timestamp(xmin) FROM mytable and get this error:
CatalogException: Catalog Error: Scalar Function with name pg_xact_commit_timestamp does not exist! The same query works fine on the DB
To Reproduce
go through the steps above
research questions:
is it possible to tell duckdb to run a query directly via the db driver (so that the function pg_xact_commit_timestamp is run on the db directly?
does duckdb implement listen/notify, and if so, do they also work on the underlying storage engine (here postgres)?
another use case would be to run queries using underlying extensions, like postGIS or TimescaleDB via duckdb
OS:
linux
PostgreSQL Version:
14.5
DuckDB Version:
latest as of 18-12-2022
DuckDB Client:
python
Full Name:
check github profile
Affiliation:
check github profile
Have you tried this on the latest master branch?
- I agree
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- I agree
amazing! only catch in the example is the wrong spelling of ferrari and testarossa ;)
question: is it possible to use listen/notify stretegies to decache attached tables in duckdb when the source table in postgres have any changes ?