Hi,
I'm building a dynamic query as described at
http://www.postgresql.org/docs/8.3/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN
:
EXECUTE 'UPDATE tbl SET ' || quote_ident(colname) || ' = ' || quote_literal(newvalue) || '
WHEREkey = ' || quote_literal(keyvalue);
It works fine, except when I want to include a boolean value: the cast
of newvalue from boolean to text causes problem.
I can change my code and work with 't' and 'f' values as text, but
wondered if there wasa way to use boolean values in a dynamically
generated query.
Thanks
Raphaël
--
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org