Open ChinaXing opened 11 years ago
the solution maybe (but not pretty ) following:
when create table, the value column should have type of bytea ; which in pgsql means binary data;
when insert or update, execute bind_param before execute:
$sth->bind_param(2,undef,{ pg_type => PG_BYTEA}); # need use DBD::Pg qw(:pg_types);
# then
$sth->execute("a" , "b" );
Thanks. If you send me a pull request (and make sure the code only takes effect when using postgres) I'll merge it in.
On Mar 19, 2013, at 12:33 AM, chinaxing notifications@github.com wrote:
the solution maybe (but not pretty ) following:
when create table, the value column should have type of bytea ; which in pgsql means binary data;
when insert or update, execute bind_param before execute:
$sth->bind_param(2,undef,{ pg_type => PG_BYTEA}); # need use DBD::Pg qw(:pg_types);
then
$sth->execute("a" , "b" ); — Reply to this email directly or view it on GitHub.
i have make pull request #2
released - let me know if it works for you - thanks
On Mar 20, 2013, at 1:58 AM, chinaxing notifications@github.com wrote:
i have make pull request #2
— Reply to this email directly or view it on GitHub.
the error is :
Use of uninitialized value $_[5] in list assignment at /usr/local/lib/perl5/site_perl/5.16.2/CHI.pm line 63. DBD::Pg::st execute failed: ERROR: invalid byte sequence for encoding "UTF8": 0x8b at /usr/local/lib/perl5/site_perl/5.16.2/CHI/Driver/DBI.pm line 115. DBD::Pg::st execute failed: ERROR: invalid byte sequence for encoding "UTF8": 0x8b at /usr/local/lib/perl5/site_perl/5.16.2/CHI/Driver/DBI.pm line 119.