[Dbix-class] Help me understand and fix this Postgresql bytea
error?
Jess Robinson
castaway at desert-island.me.uk
Tue Jan 1 13:24:48 GMT 2008
On Sun, 30 Dec 2007, Dennis Daupert wrote:
> I've used SQL::Translator to translate a mysql schema file to postgresql schema file. He translates this:
>
> arg MEDIUMBLOB,
>
> into this:
>
> "arg" bytea (16777215),
>
> But when I try to slurp the sql file into Pg, I get this error:
>
> ERROR: syntax error at or near "(" at character 93
> LINE 4: "arg" bytea(16777215),
>
> I do not understand this error, nor how to resolve it. Pg doco and googling have left me even more confused.
>
You're also in the wrong mailing list, SQL::Translator has it's own list.
It's entirely possible that the SQL::T Postgres producer code has bugs, so
chase those, rather than looking for what you did wrong.
OTOH I can't see from
http://www.postgresql.org/docs/8.2/interactive/datatype.html which types
want (size) args, and which don't.. Anyone got a doc that will tell me?
The PG Producer does this for exceptions:
#
# PG doesn't need a size for integers or text
#
undef @size if $data_type =~ m/(integer|smallint|bigint|text)/;
Jess
More information about the DBIx-Class
mailing list