Re: UTF-8 context of BYTEA datatype??

Поиск
Список
Период
Сортировка
От Rafal Pietrak
Тема Re: UTF-8 context of BYTEA datatype??
Дата
Msg-id 1149062075.14902.151.camel@model.home.waw.pl
обсуждение исходный текст
Ответ на Re: UTF-8 context of BYTEA datatype??  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
On Tue, 2006-05-30 at 22:47 +0200, Martijn van Oosterhout wrote:
> That's why bytea need special encoding to get around this check.

But may be you would know, why I should write:

    { pg_type => DBD::Pg::PG_BYTEA }

instead of possibly more generic:

    { TYPE => SQL_BINARY }

The later is *explicitly* stated as undocumented/invalid/depreciated by
the DBD::Pg documentation. While if valid, it would potencially allow me
NOT to "use DBD::Pg;" -- which would be a GoodThing(tm).

Do you know why?

> However, there is a solution: send the paramters seperate from the

How? I always thought that:
1. $db->prepare("string with q-marks in it"); $db->execute(@vector) does
the trick. (and in fact, "prepare" allows driver to sense datatypes for
@vector). I always do that, but exactly this form failed in this case.
2. or you mean $sh->bind_param(id, $value, \%atr), which I've just
learned to use? This one can potencially be generaly usefull if
available in the form "TYPE => SQL_BINARY", instead of "pg_type =>
DBD::Pg::PG_BYTEA".
3. or you mean something else is there. What is it? In what other way I
can pass parameters separately?

--
-R

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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Best high availability solution ?
Следующее
От: Nis Jorgensen
Дата:
Сообщение: Re: Lossy character conversion to Latin-1