Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 50FFE2E0031 for ; Fri, 16 May 2008 12:21:21 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95405-06 for ; Fri, 16 May 2008 12:21:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from alexis.jtlnet.com (alexis.jtlnet.com [69.36.9.81]) by developer.postgresql.org (Postfix) with ESMTP id 351262E002E for ; Fri, 16 May 2008 12:21:18 -0300 (ADT) Received: from [192.168.10.103] (cpe-075-177-177-228.nc.res.rr.com [::ffff:75.177.177.228]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by alexis.jtlnet.com with esmtp; Fri, 16 May 2008 11:20:55 -0400 id 0008BBB7.482DA658.000062B7 Message-ID: <482DA66B.4000901@dunslane.net> Date: Fri, 16 May 2008 11:21:15 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.12) Gecko/20071019 Fedora/1.0.9-3.fc6 pango-text SeaMonkey/1.0.9 MIME-Version: 1.0 To: Merlin Moncure CC: Tom Lane , Andrew Chernow , Alvaro Herrera , "Patches (PostgreSQL)" Subject: Re: libpq object hooks References: <6044.1210867771@sss.pgh.pa.us> <482C77E5.1060500@esilo.com> <9458.1210875556@sss.pgh.pa.us> <482C82BA.3090100@esilo.com> <9867.1210877054@sss.pgh.pa.us> <482CD76E.6000202@esilo.com> <17177.1210949948@sss.pgh.pa.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/326 X-Sequence-Number: 6352 Merlin Moncure wrote: > >> Also, even if varargs are safe they'd be notationally unpleasant >> in the extreme. varargs are just a PITA to work with --- you'd have >> to do all the decoding in the first-level hook routine, even for >> items you weren't going to use. With something like the above >> all you need is a switch() and some pointer casts. >> > > Switch, plus struct (basically a union) will do the trick nicely. Can > it be a formal union, or is it better as a void*? > > The main issue was how what we called the 'hook data' was passed back > and forth. We'll get a patch up. > > > All of this is getting quite a long way from what was in the commitfest queue. Do we still want to try to get this in this cycle, or should it be marked returned to author for more work? cheers andrew