xml - How to use parameter in postgresql -


use in xml query

searchcategory1=" select "$1" "$2" group "$1" order "$1"" 

but error message error: relation "$2" not exist

how can pix query?

there 3 mistakes visible here:

  1. you double-quoted $1 , $2, not interpreted parameters, object name (they quoted identifiers).

  2. you can use parameters in prepared statements or pl/pgsql code.

  3. parameters in queries can used in place literal appear, cannot used column , table names.
    you'll have replace placeholders before submit statement database.


Comments