[Libpqxx-general] Prepared statements parameters inconsistency
Trigve Siver
trigves at yahoo.com
Tue Jul 14 07:55:45 UTC 2009
Hi,
I've trouble executing "UPDATE" prepare statement with parameters. I've simple query like "UPDATE customer SET id = $1, id_sub = $2 WHERE (id = $1 AND id_sub = $2)", where "id", "id_sub" are varchars. I prepare statement with 2 parameters as "decl("varchar", pqxx::prepare::treat_string)". When executing this statement I've got error saying:
ERROR: inconsistent types deduced for parameter $1
DETAIL: text versus character varying
I've search if someone has encountered this behaviour but had found nothing. Also note when using the same parameters but with "SELECT" query no error is thrown, only with "UPDATE" I have a problem. Please, anyone know where the problem could be?
Thanks
Trigve
More information about the Libpqxx-general
mailing list