public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Greg Sabino Mullane <[email protected]>
Cc: Igor Korot <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Why that query fails?
Date: Sun, 26 Apr 2026 18:59:21 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAKAnmm+T9=yKB2kuWUAMaZ9jipbkQGJFbCfmq0z6cJ_OAw2M4g@mail.gmail.com>
References: <CA+FnnTy3D3Zo0XxNe37w5FnmGftvv_jWuLVMdS0Y3qPanx2seA@mail.gmail.com>
	<CAKAnmm+T9=yKB2kuWUAMaZ9jipbkQGJFbCfmq0z6cJ_OAw2M4g@mail.gmail.com>

Greg Sabino Mullane <[email protected]> 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






reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Why that query fails?
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox