[Dbix-class] Pg bytea does not work
John Napiorkowski
jjn1056 at yahoo.com
Mon Oct 15 13:41:35 GMT 2007
--- Rolf Schaufelberger <rs at plusw.de> wrote:
> Hi,
>
> I have a table like this:
> id | integer | not
> null default
> nextval('orders.logos_id_seq'::regclass)
> name | character varying(100) |
> image | bytea |
> ...
>
> and in my class I have
> ...
> __PACKAGE__->add_columns ( image => { data_type =>
> 'bytea' });
> ...
>
> Now when I try to insert something in image I get an
> error
>
> DBIx::Class::ResultSet::create(): DBI Exception:
> DBD::Pg::st execute failed:
> ERROR: invalid byte sequence for encoding "UTF8":
>
> Debuggung showed me, that
>
> bind_attribute_by_data_type is called in
> D:C:Storage:DBI and not in D:C:Storage:DBI::Pg
>
> All my classes inherit from a base class which does
>
> __PACKAGE__->load_components(qw/Core PK::Auto/);
>
> Any idea ?
>
>
> I have DBD 1.4.9 and DBIx::Class 0.8 (just upgraded
> 5 min ago..)
> I have the same table running with Class::DBI anf
> now want to move to DBIC.
>
> --
> Regards
> Rolf Schaufelberger
What version of the Postgresql database are you on?
I'm the culprit that wrote the section of code you
mentioned so I'm like to get more details.
--john
>
>
> _______________________________________________
> List:
>
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN:
> http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
>
http://www.grokbase.com/group/dbix-class@lists.rawmode.org
>
____________________________________________________________________________________
Catch up on fall's hot new shows on Yahoo! TV. Watch previews, get listings, and more!
http://tv.yahoo.com/collections/3658
More information about the DBIx-Class
mailing list