Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Duck DB support triggers?

Tags:

sql

duckdb

I suspect the answer is no, but I just wanted to check if anyone has a way to implement triggers in DuckDB?

I have a SQLite database that relies heavily on views with INSTEAD OF INSERT/ UPDATE/ DELETE triggers to mask the underlying table structure from applications. Having heard good things about DuckDB I was hoping to try a port, but the lack of triggers (or an alternate mechanism for achieving the same goal) is a show stopper. I've no great desire to reimplement all of the functionality in the various host languages that access the database.

like image 418
David Avatar asked Oct 18 '25 09:10

David


1 Answers

No.

The documentation of DuckDB (as of Oct'2022) doesn't contain any reference to database triggers.

That said, given the nature of the project -- an analytical (OLAP) database, instead of a transactional (OLTP) one -- I would say the developers have few incentives to implement this feature, anyway.

Also, this issue on GitHub DuckDB.

Both SQLite and DuckDB are two fantastic tools! But very different beasts. Use the best tool for your job.

like image 151
F.D.Castel Avatar answered Oct 19 '25 23:10

F.D.Castel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!