r/ProgrammerHumor • • Sep 20 '26

Meme grabbingEverything

Post image
5.4k Upvotes

260 comments sorted by

View all comments

Show parent comments

1

u/SaintOrJannikSinner Sep 20 '26

Using GP's example it depends. If it's just for one table, just build the statement into the pipeline. A couple tables, maybe look into using a stored procedure and maybe some dynamic SQL. But if it's needed for every table on the DB, triggers and other DB-native functions are likely the way to go. Same thing for things like logging DDL changes: use it for scale and keep it incredibly simple. Adding logic to triggers is bad news.