Author Topic: Converting Databast from MySQL to PostgreSQL  (Read 13894 times)

Offline demize

  • Semi-Newbie
  • *
  • Posts: 37
Converting Databast from MySQL to PostgreSQL
« on: November 22, 2009, 08:45:19 PM »
I don't believe there's a way to do this in the board, but could anybody tell me a way to do it? I'm getting a VPS with somebody, and he likes PostgreQL more so it would be nice if I could use it instead of MySQL, because I don't have much use for a database aside from the forum.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,361
    • Arantor on GitHub
Re: Converting Databast from MySQL to PostgreSQL
« Reply #1 on: November 22, 2009, 09:27:19 PM »
There are still known issues in the PostgreSQL implementation in SMF 2.0 at present.

As for how you'd do it, you'd essentially create a new forum in 2.0 with PostgreSQL, then use the backup facilities in the original forum to export the 'data only' part and import that into PostgreSQL. At least, that's the theory...
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

You either die a hero or live long enough to see yourself become the villain. It seems you have chosen which, and now I must do the same.

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,817
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Converting Databast from MySQL to PostgreSQL
« Reply #2 on: November 23, 2009, 01:01:43 AM »
phpMyAdmin allows you to export data in PostgreSQL-compatible format, so that would be your best option.

Alternately, you could download Navicat for PostgreSQL and import it that way (the "lite" version doesn't support this functionality).

However, as Arantor said, there are known issues with PostgreSQL at the moment, particularly with the install/upgrade, so you might want to hold off until RC3. Also note that some mods may not work properly with PostgreSQL.
Michael Eshom
Webmaster / SMF Lead Developer