[postgis-users] MySQL -> Postgresql - habitat column name

Nicolas Ribot nicolas.ribot at gmail.com
Fri Jul 16 03:30:28 PDT 2010


On 15 July 2010 20:37, Michael A. Peters <mpeters at shastaherps.org> wrote:
> I'm currently working on a migration of my web site to postgresql so that
> I can use PostGIS.
>
> I'm still working on the devel side but basically -
>
> mysqldump database > dump.sql
> perl mysql2pgsql.perl dump.sql load.sql
> psql database < load.sql
>
> does the trick, now it's cleaning up my sql in my code.
>
> I used MDB2 so once I finally figured out how to make a web user with
> necessary permissions most of it "just worked" but - I had a table with a
> column named habitat. On a query on that table, query failed. When
> manually applying the query, it said habitat did not exist.
>
> I looked in the load file (there's no describe table ??) and habitat was
> changed to habyteaat but I can find nothing about habitat being a special
> word to postgresql. Is that a bug in the perl script I can just sed to fix
> the output or do I really need to use a different column name?
>
>

Hmm funny:
seems that the perl script is replacing every instance of 'bit' to
'bytea' (a PG datatype).
definitely, 'habitat' is a valid column name.

Nicolas



More information about the postgis-users mailing list