Storm contrib module it's not database agnostic, many of the insert queries use a syntax that it's only valid in MySQL databases (INSERT INTO table SET column_a = "a" ....)

A more standard syntax should be used instead. "INSERT INTO table VALUES (...)"

By the way, you're doing a great job with this module.

Greetings.

CommentFileSizeAuthor
#5 postgre-846544-5.patch59 KBkfritsche

Comments

carsten müller’s picture

Assigned: Unassigned » carsten müller

Hi davfigue,

sorry for that. I am not very familiar with PostgreSQL. Normally i just work with MySQL. I know this is a bug and there are many Todos for this in the code. I will try to fix that as soon as possible. At the moment i do not have the time because i have to fix a lot of other issues because my company starts working with this. But if there is anybody who wants to help with this, just post patches.

Greetings
Carsten

Anonymous’s picture

Hi Carsten,

Well as I am very interested in using Storm and Storm contrib modules for my company. I will help sending you patches of whatever that I can fix

Kind regards,

David

carsten müller’s picture

Hi David,

thanks for your help.

carsten müller’s picture

Hi,

sorry for the delay. We are going to start soon the changes so PostgreSQL will be supported too.

kfritsche’s picture

Status: Active » Needs review
StatusFileSize
new59 KB

Okay i'm working on it.
I changed all SQL "insert into" into the corresponding drupal_write_record function and this works with PostgreSQL.
Also i changed the string escape for all SQL statments - Postgre only allows ' (single quote) for string escape, " (double quotes) are only for system identifiers (e.g. table names). MySQL can handle both.
Here the patch (new git format - hopfully this works ...). I will try to push the changes in the beginning of next week.

kfritsche’s picture

Assigned: carsten müller » kfritsche
Status: Needs review » Fixed

Patch commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.