Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => PostgreSQL and SQLite Support => Topic started by: avaluedcustomer on January 26, 2014, 04:32:47 AM

Title: Install on Postgres fails, invalid SQL used when populating tables
Post by: avaluedcustomer on January 26, 2014, 04:32:47 AM
Hello,

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


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:

.. 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?


Title: Re: Install on Postgres fails, invalid SQL used when populating tables
Post by: emanuele 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).
Title: Re: Install on Postgres fails, invalid SQL used when populating tables
Post by: shentino on June 07, 2015, 05:34:02 AM
When is this bug going to get fixed?
Title: Re: Install on Postgres fails, invalid SQL used when populating tables
Post by: Oldiesmann 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.