Advertisement:

Author Topic: Install on Postgres fails, invalid SQL used when populating tables  (Read 17204 times)

Offline avaluedcustomer

  • Newbie
  • *
  • Posts: 1
Hello,

I wanted to install SimpleMachine using Postgres (9.3.2) but the installer fails with the following message:

Code: [Select]
Some of the queries were not executed properly. This could be caused by an unsupported (development or old) version of your database software.

Technical information about the queries:

    Line #736: ERROR: syntax error at or near "s"
    LINE 4: ...r_holidays (title, event_date) VALUES ('New Year\'s', '0004-...

The above is invalid SQL because single quotes need to be escaped using another single quote, not using a backslash:

So the SQL should read something like this:

Code: [Select]
.. VALUES ('New Year''s', '0004-...
I'm using SimpleMachines 2.0.7.

Is this a known bug? How can I fix the SQL that is being used?



Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Install on Postgres fails, invalid SQL used when populating tables
« Reply #1 on: January 26, 2014, 04:44:15 AM »
Hello avaluedcustomer,

yes it's a known bug and the fix is to replace all the \' in the sql file to '' (well, not exactly all of them but most).


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non รจ una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline shentino

  • Semi-Newbie
  • *
  • Posts: 75
Re: Install on Postgres fails, invalid SQL used when populating tables
« Reply #2 on: June 07, 2015, 05:34:02 AM »
When is this bug going to get fixed?

Offline Oldiesmann

  • Developer
  • SMF Super Hero
  • *
  • Posts: 24,814
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • http://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Install on Postgres fails, invalid SQL used when populating tables
« Reply #3 on: June 17, 2015, 12:26:53 PM »
We'll try to get it fixed in the next version of 2.0 if that happens, otherwise it'll be fixed for 2.1.
Michael Eshom
Webmaster / SMF Lead Developer
oldiesmann@simplemachines.org