← Back to context

Comment by hombre_fatal

1 day ago

People don't do that because when you're writing insert/update queries, you tend to want to write logic based on the value of intermediate results, and also you can't return tabular data from a DO block (they operate as a function returning void).

You also can't use parameterized values like $1, $2.

It seems more niche than you're suggesting. Though I wish people would write app layer pseudocode to demonstrate what they are referring to.