Dynamic Commands in PL/pgSQL
The execute
keyword allows you to run a dynamic command - where perhaps a table or column name is not known ahead of time.
Some notes from the docs:
- There is no plan caching for dynamic commands - commands executed via
execute
. - Be careful not to do something like
key = null
, wherenull
is passed in dynamically. (Useis distinct from
). - See the
using
clause for passing parameters to the dynamic command.
You can read more about this here.
Wow! You read the whole thing. People who make it this far sometimes
want to receive emails when I post something new.
I also have an RSS feed.