Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id A41232E010A for ; Wed, 14 May 2008 12:21:34 -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 27647-02-6 for ; Wed, 14 May 2008 12:21:25 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by developer.postgresql.org (Postfix) with ESMTP id 3A0592E00BE for ; Wed, 14 May 2008 12:09:26 -0300 (ADT) Received: by fg-out-1718.google.com with SMTP id 16so3649737fgg.23 for ; Wed, 14 May 2008 08:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=c22Ak+TEbPjgt1EObJ9ZUGYT1dixeO8pskQ20j235iA=; b=lG+r6lmOuZB4woNh3jnIAOf9t2/yzaRRL9xQSD95dugoUAcYz9nXEIPZHB+scamvmmvGpRxMV+Iqq6zPV13ngLSrYdNQPZHz5PMHwH5Mskv1vgyj0Uezvp/jun6VQFuwvoCOunRwUY8eGqIIBfhXZfXsmilNfNQAMJIPhVCik0M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TCMFSIwzjMBCzkwUshTeoe4VhpF7jh7dGm5xk5XKGOnAepiA+mJw71UUtxUswY1X4U3O2VfGEVkKpHtW4yAnNyVxVNST5MjXY7HTKTOCnKjzpHjyxWaqhN3RND6uF6H9kDp6VWDn0Wu+OUU6+TdCGmDK5SVhvEFBjDqMbjTJNTY= Received: by 10.82.159.15 with SMTP id h15mr144736bue.6.1210777765055; Wed, 14 May 2008 08:09:25 -0700 (PDT) Received: by 10.82.145.1 with HTTP; Wed, 14 May 2008 08:09:25 -0700 (PDT) Message-ID: Date: Wed, 14 May 2008 11:09:25 -0400 From: "Merlin Moncure" To: "Bruce Momjian" Subject: Re: libpq object hooks Cc: "Andrew Dunstan" , "Alvaro Herrera" , "Patches (PostgreSQL)" , "Andrew Chernow" In-Reply-To: <200805141452.m4EEqh814039@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200805141452.m4EEqh814039@momjian.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/242 X-Sequence-Number: 6268 On Wed, May 14, 2008 at 10:52 AM, Bruce Momjian wrote: > Merlin Moncure wrote: >> Regarding the other comments: >> *) API structure: Our major objective was to minimize exports to >> libpq. I think both copyresult and setvalue have some possible >> sideband usage (footguns or no). Additional functions could be >> speculated but are not required by libpqtypes. We would have no >> problem adding a few things to complete the api if necessary. >> >> The patch is basically the minimum libpqtypes needs and has to work >> more or less as written. We tried a few times to suggest implementing >> the split a different way (basically, more invasion into libpq). We >> couldn't get any action there. >> >> If the patch is rejected on general merits...that signals the death >> blow for libpqtypes. We have a chicken/egg problem...people can't use >> it without patching libpq which will really hamper its adoption, which >> is, uh, needed to justify the patch. For the record, we have had a >> couple of dozen downloads of the libpqtypes library on pgfoundry since >> we put it up there last week. Based on how it has simplified and >> improved our own code vs. libpq, we have absolutely no doubts it is a >> major improvement over PQexecParams. > > One idea would be to add the libpq hooks but not document them. This > way, we can modify or remove the API as needed in the future. As > libpqtypes matures and we are sure what the API should be, we can > document it as stable and permanent. The API functions relating to hooks are unlikely to change once settled on...but PQsetvalue/PQcopyResult are a good fit with your idea (they introduce new behaviors that could possibly be used outside of libpqtypes context, and could require changes down the line). merlin