Closed (fixed)
Project:
Mail Logger
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Sep 2008 at 08:49 UTC
Updated:
4 Jun 2014 at 08:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
deekayen commentedSeems like there ought to be a better way to escape those queries. They basically look like this in the attached zip:
It doesn't look quite so weird in the .install file, but isn't the standard for escaping column names to use backticks, not double quotes anyway or does that not work the same in PostgreSQL as in MySQL? If not backticks, why not apostrophes?
Comment #2
zoltán balogh commentedSo... close.
Comment #3
landry commentedReopening, as i've stumbled upon this issue.
Here's a diff against last cvs snapshot that fixes the issue for me:
- rename to -> mail_to and from -> mail_from. to and from are sql keywords, so regardless of quoting this can lead to confusion
- remove backticks, they are now unneeded, and they only work on mysql. On postgres, quoting is done using "".
the only thing not dealt with is the upgrade path for mysql users, where the existing db columns would need to be renamed in mail_logger_update_XXXX().
Comment #4
landry commentedComment #5
landry commentedOn top of that patch, here's another one needed for postgresql. On mysql, you can feed NULL to a serial field, on postgresql it's an error. So let's get the next value for serial using SELECT nextval('{mail_logger_mlid_seq}'). Tested here, works fine.
Comment #6
fizk commentedLooks like this was committed at some point.