[Dbix-class] Re: Help me understand and fix this Postgresql bytea error?

Jess Robinson castaway at desert-island.me.uk
Wed Jan 2 13:08:34 GMT 2008


Hi John,

On Tue, 1 Jan 2008, John Napiorkowski wrote:

> Dennis,
>
> I may be confused about what you are trying to do.  If
> you just want BYTEA type column support in Postgresql
> so that you can use DBIC to store blog style
> information in the database, you need to make your
> storage definition classes like:
>
> (In your class)
>
> __PACKAGE__->add_columns(
> "media" => {
>  data_type => "bytea",
>  is_nullable => 0,
>  ## rest of the column definition
> });
>
> Then if you have a table with column 'media' that is
> bytea type you can read/write huge blobs of stuff
> without any trouble (at least for Postgresql)
>
> Is this what you are looking for or I am just enjoying
> my vacation too much and leaving my brain behind
> somewhere :)

Please expand your email-keyword-scanner to read the actual email 
contents.

This is not a question about how to use bytea fields in DBIC.

It is a question about why SQL::Translator outputs incorrect SQL for 
PostgreSQL, when translating a mysql schema containing the type 
"mediumblob".

Jess



More information about the DBIx-Class mailing list