[Mod_log_sql] postgreSQL support

Manfred Haelters manfred at haelters.be
Tue Jan 25 09:30:50 EST 2005


I want to get mod_log_sql working with postgreSQL, but it the support is 
not yet plugged in. This is why I tried to complete the 
mod_lod_sql_pgsql.c.  (see attachment)

The result works for me, I did not yet have the time to fully test it 
(small tests work).

The problems I've encountered are the following:
1/ PQescapeString does not place the ' around the strings. So I had to 
do this manually.
2/ I limited the queries to 250 characters (in the escaped string), 
since otherwise big request don't get logged but are put in the preserve 
file.
3/ I always had to return the escaped string even when the from_str was 
empty (in order to get the ' in place)
4/ I removed the check for the unexistant table, since I don't know how 
to do this.

I'm not a C developper, so if I did it wrong, I would appreciate to 
receive the remarks. Also If someone knows how to use the dbi interface 
(especially the config in apache), please let me know

Manfred

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mod_log_sql_pgsql.c
Url: http://lists.outoforder.cc/pipermail/mod_log_sql/attachments/20050125/6e883799/attachment.c 


More information about the Mod_log_sql mailing list