Opening a cursor

You have opened a cursor variable and given it a specific query to execute as follows:

OPEN curs1 FOR EXECUTE format(‘SELECT * FROM %I WHERE col1 = $1’,tabname) USING keyvalue;

Which of the following can be inferred from the given statement?

Options
  1. The table name is inserted into the query via format() and comparison value for col1 is inserted via a USING parameter.
  2. The table name is inserted into the query via format() along with the comparison value for col1.
  3. The table name is inserted into the query along with the comparison value for col1 is inserted via a USING parameter.
  4. The table name is inserted into the query via a USING parameter.

Related Posts