| From: | Rafal Pietrak <rafal(at)zorro(dot)isa-geek(dot)com> |
|---|---|
| To: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
| Cc: | Daniel Verite <daniel(at)manitou-mail(dot)org>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: UTF-8 context of BYTEA datatype?? |
| Date: | 2006-05-31 07:54:33 |
| Message-ID: | 1149062075.14902.151.camel@model.home.waw.pl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Markus Schiltknecht | 2006-05-31 07:55:05 | Re: Best high availability solution ? |
| Previous Message | Arnaud Lesauvage | 2006-05-31 07:36:23 | Best high availability solution ? |