Re: Why that query fails?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Why that query fails?
Дата
Msg-id 2423212.1777244361@sss.pgh.pa.us
обсуждение
Ответ на Re: Why that query fails?  (Greg Sabino Mullane <htamfids@gmail.com>)
Список 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



В списке pgsql-general по дате отправления: