On Mon, 8 Jun 2015 02:56:33 +0200 Joerg Sonnenberger <jo...@britannica.bec.de> wrote:
JS> Without parameter type, literal string format is assumed. Consider: JS> JS> create temp table test (a text, b bytea); JS> insert into test values ('\\x0030', '\\x0030'); JS> insert into test values (E'\\x0030', E'\\x0030'); JS> select * from test; Sorry, but I'm even more lost now than before... For the record, the result of the above is: a | b ---------+---------------- \\x0030 | \x5c7830303330 \x0030 | \x0030 but what do we want to have, the first value or the second one? It seems to me that the first one, being the binary representation of the string "\x0030" (6 bytes) is right here but I am not sure about this and I'm also confused by the double backslash: it's not supposed to be interpreted at all outside of E'...' strings, is it? JS> That's why the OID dance is needed in the patch. Suggestions for JS> avoiding it are welcome :) What happens if we don't touch PQprepate() but pass the correct OIDs to PQexecParams(), could this work? VZ
pgphgdBO1jj7M.pgp
Description: PGP signature
------------------------------------------------------------------------------
_______________________________________________ soci-devel mailing list soci-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/soci-devel