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

_______________________________________________
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/[EMAIL PROTECTED]

Reply via email to