[Devel] postgres problem with mysql proprietary SQL queries
klaus.mailinglists at pernau.at
Mon Aug 1 10:46:07 CEST 2005
I tried to use the lcr module with postgres and found the following
problem, which is a generic problem.
The lcr module uses SQL queries, which are mysql proprietary. (e.g.
CONCAT, RAND). These queries must be adopted to fit postgresql.
There are several options how to do this:
1. The module should parse the db_url, and according to the service
(mysql, postgres, ...) the proper SQL query should be used.
2. a compilation option
Please give us your comments and other ideas to solve this problem.
-------- Original Message --------
I do not have commited the lcr module as I found an open issues: The
SELECT queries are not compatibel with postgresql. postgres has other
syntax for CONCAT and RAND:
CONCAT --> ||
RAND() --> RANDOM()
Thus, the lcr module would have to query the db_url if it is postgres or
mysql and use the proper SELECT query.
Attached is the lcr_mod.c patched with URI scheme and transport, and
also the SELECT was changed to fit postgres. Maybe you can take a look
at this problem.
btw: openser crashes with the original mysql SELECT sent to postgres. I
think this is a bug in the postgres module.
More information about the Devel