From dev-return-16592-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Tue Jun 13 20:29:21 2006 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 10213 invoked from network); 13 Jun 2006 20:29:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jun 2006 20:29:20 -0000 Received: (qmail 13094 invoked by uid 500); 13 Jun 2006 20:29:20 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 12744 invoked by uid 500); 13 Jun 2006 20:29:19 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 12733 invoked by uid 99); 13 Jun 2006 20:29:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 13:29:18 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [206.47.199.163] (HELO simmts5-srv.bellnexxia.net) (206.47.199.163) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 13:29:16 -0700 Received: from [192.168.0.103] ([65.95.228.211]) by simmts5-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060613202854.HFYJ21960.simmts5-srv.bellnexxia.net@[192.168.0.103]>; Tue, 13 Jun 2006 16:28:54 -0400 Message-ID: <448F2047.4010406@pearsoncmg.com> Date: Tue, 13 Jun 2006 16:29:59 -0400 From: Chris Darroch Organization: Pearson CTG/CMG User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060423 X-Accept-Language: en-ca, en-us MIME-Version: 1.0 To: dev@apr.apache.org Subject: Re: current dbd initiatives References: <20060608170430.ldbedf96ckccss0k@www.rexursive.com> <44884A0E.3000107@pearsoncmg.com> <20060609101900.l21i463xwc0g40o0@www.rexursive.com> <448A2E57.7070509@pearsoncmg.com> <1150008489.25077.33.camel@coyote.rexursive.com> <448DE1F5.7020707@pearsoncmg.com> <1150155200.3581.13.camel@coyote.rexursive.com> In-Reply-To: <1150155200.3581.13.camel@coyote.rexursive.com> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bojan Smojver wrote: >> Moreover, if this is the desired behaviour, then migrating from >> expecting purely string arguments in apr_dbd_pvquery() and >> apr_dbd_pvselect() to a sprintf()-style mix of strings and other data >> types surely isn't going to be easy: how do you distinguish a >> "no more arguments" NULL from an integer zero? > > Easily. You always pass in pointers to data, not data itself. For > instance: > > int i=0; > apr_dbd_pvselect([other args],&i,NULL); Heh ... well, yes, that's true. But isn't that drifting rather far away from the "works like sprintf()" idea? Don't get me wrong, BTW -- I like the sprintf()-like notation for simple queries, and I wish that %d, %u, %f and perhaps one or two others could be added, and arguments (except strings) passed in by value, in the manner of sprintf(). But it seems to me that, first, if the existing PostgreSQL driver's use of %d to mean "pass an int as a string" isn't changeable until 2.0, then things like %f should mean "pass a float as a string" too, and that's getting a little far away from Nick's original intention. So I guess I would be inclined to leave things as-is for a while and come back to a true sprintf()-style interface in 2.0. Chris. -- GPG Key ID: 366A375B GPG Key Fingerprint: 485E 5041 17E1 E2BB C263 E4DE C8E3 FA36 366A 375B