Re: Why that query fails?
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Sabino Mullane <htamfids@gmail.com>
Cc: Igor Korot <ikorot01@gmail.com>,
"pgsql-generallists.postgresql.org"
<pgsql-general@lists.postgresql.org>
Date: 2026-04-26T22:59:21Z
Lists: pgsql-general
Greg Sabino Mullane <htamfids@gmail.com> writes: > You are using binary format, but your length calculation is wrong: > int len1 = (int) name.length() * sizeof( wchar_t ); I think the actual problem is that he's trying to send an array of wchar_t to the server. That is not bit-compatible with UTF-8, even though they are both representations of Unicode. The query string itself has the same problem I think (I believe the L"..." syntax in C produces an array of wchar_t). regards, tom lane