From erik.enge at gmail.com Sun Jul 23 21:25:43 2006 From: erik.enge at gmail.com (Erik Enge) Date: Sun, 23 Jul 2006 17:25:43 -0400 Subject: [pg-cvs] Debugging what's sent to the database, and pg-exec modification. Message-ID: <58f839b70607231425k47d437bfgf1fd43b12f08d283@mail.gmail.com> 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. From erik.enge at gmail.com Thu Jul 27 15:31:16 2006 From: erik.enge at gmail.com (Erik Enge) Date: Thu, 27 Jul 2006 11:31:16 -0400 Subject: [pg-cvs] Debugging what's sent to the database, and pg-exec modification. In-Reply-To: <87ac6x8pvd.fsf@free.fr> References: <58f839b70607231425k47d437bfgf1fd43b12f08d283@mail.gmail.com> <87ac6x8pvd.fsf@free.fr> Message-ID: <58f839b70607270831y461b2561g8097ce08c982f6d1@mail.gmail.com> On 7/25/06, Eric Marsden wrote: > that sounds useful ; please send patches. Patch attached. Thanks, Erik. -------------- next part -------------- A non-text attachment was scrubbed... Name: pg.patch Type: application/octet-stream Size: 2771 bytes Desc: not available URL: From erik.enge at gmail.com Thu Jul 27 15:54:20 2006 From: erik.enge at gmail.com (Erik Enge) Date: Thu, 27 Jul 2006 11:54:20 -0400 Subject: [pg-cvs] Debugging what's sent to the database, and pg-exec modification. In-Reply-To: <58f839b70607270831y461b2561g8097ce08c982f6d1@mail.gmail.com> References: <58f839b70607231425k47d437bfgf1fd43b12f08d283@mail.gmail.com> <87ac6x8pvd.fsf@free.fr> <58f839b70607270831y461b2561g8097ce08c982f6d1@mail.gmail.com> Message-ID: <58f839b70607270854n23e2c70at22b36fd1ce50c95f@mail.gmail.com> On 7/27/06, Erik Enge wrote: > Patch attached. Something not included in the patch and I just thought of: it would be nice if pgcon-{host,port,pid} (those are the ones I'm currently referencing, others would probably also be interesting) were exported. Thanks, Erik.