PostgreSQL Antipatterns: passing sets and selections in SQL
Occasionally, the developer needs to pass a set of parameters or even an entire selection into a request. Sometimes, very strange solutions to this task arise. Let's approach it "from the opposite" and see how not to do it, why, and how it can be done better. Direct "insertion" of values into the body of the request usually looks something like this: query = 'SELECT * FROM tbl WHERE […]'
