Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0421D632F9E for ; Thu, 22 Apr 2010 19:22:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 84276-06 for ; Thu, 22 Apr 2010 22:22:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glacier.frostconsultingllc.com (glacier.frostconsultingllc.com [69.36.227.170]) by mail.postgresql.org (Postfix) with ESMTP id 4AAFC632806 for ; Thu, 22 Apr 2010 19:22:31 -0300 (ADT) Received: from dsl081-245-111.sfo1.dsl.speakeasy.net ([64.81.245.111] helo=Sidney-Stratton.local) by glacier.frostconsultingllc.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1O54mx-0004YU-5S; Thu, 22 Apr 2010 15:22:29 -0700 Message-ID: <4BD0CC22.6040400@agliodbs.com> Date: Thu, 22 Apr 2010 15:22:26 -0700 From: Josh Berkus User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b3pre) Gecko/20090223 Thunderbird/3.0b2 MIME-Version: 1.0 To: Ingmar Brouns CC: pgsql-testers@postgresql.org Subject: Re: Named parameter notation in Postgresql 9.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.846 tagged_above=-10 required=5 tests=AWL=0.054, BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/11 X-Sequence-Number: 81 On 4/22/10 9:27 AM, Ingmar Brouns wrote: > Wouldn't it be better to relax this constraint, and instead check that > when a function is being called using positional notation, that all > parameters must have been provided until (including) the last > parameter that has no default value. The problem is that you can't know how the function is going to be called in the future. That is, regardless of how you create the proc, it could be called either named or positionally. Checking it at calling time doesn't work because we need to create the "fingerprint" of a proc when it's created, not when it's called. So, potentially solvable but will require a lot more mucking around with function call code to make it work. You're welcome to hack on it. -- -- Josh Berkus PostgreSQL Experts Inc. http://www.pgexperts.com