[pg-cvs] Debugging what's sent to the database, and pg-exec modification.

Erik Enge erik.enge at gmail.com
Sun Jul 23 21:25:43 UTC 2006


Hi,

I'm sorry if I missed this but I couldn't find it in the sources.  I
have modified my local copy of PG to check for a debug stream (set per
connection object, default nil) in send-packet and if it's not nil
then output the connection, code and description parameters to that
stream.  This way I can set it to T (or whatever) in my library and
see the exact SQL sent to the database.

The second modification I have made locally is to add a function which
wraps pg-exec and which lets you do things like:

  (db-exec connection "select * from ~a" 'a-table)

Ie treats the last two parameters as a format-string and format-args.

Want patches?

Thanks,
Erik.



More information about the pg-devel mailing list