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

Michael A. Peters mpeters at shastaherps.org
Thu Jul 15 11:37:39 PDT 2010

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?

Michael A. Peters


More information about the postgis-users mailing list