Dynamic SQL is any SQL statement that is first built as a text string and then executed using the
EXECUTE command. An example of dynamic SQL is shown in Listing
13-1. Dynamic SQL is underused in most RDBMSs, but especially in PostgreSQL. The recommendations in this chapter go against the grain of many database textbooks, but all suggestions are based strictly ...