Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9D2069F9C3D for ; Tue, 18 Sep 2007 19:11:53 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 10533-02 for ; Tue, 18 Sep 2007 19:11:48 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from momjian.us (momjian.us [70.90.9.53]) by postgresql.org (Postfix) with ESMTP id 54CEE9F9B4C for ; Tue, 18 Sep 2007 19:11:48 -0300 (ADT) Received: (from bruce@localhost) by momjian.us (8.11.6/8.11.6) id l8IMBl527174; Tue, 18 Sep 2007 18:11:47 -0400 (EDT) From: Bruce Momjian Message-Id: <200709182211.l8IMBl527174@momjian.us> Subject: Re: plpgsql: defuault parameters and constant function parameters In-Reply-To: <200709182325.12677.peter_e@gmx.net> To: Peter Eisentraut Date: Tue, 18 Sep 2007 18:11:47 -0400 (EDT) CC: pgsql-interfaces@postgresql.org, Tom Lane , Roger Moloney X-Mailer: ELM [version 2.4ME+ PL123] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/4 X-Sequence-Number: 6626 Peter Eisentraut wrote: > Tom Lane wrote: > > It's easier if the defaultable parameters are at the end, but I > > rather wonder how your informix system is disambiguating the calls > > either with a signature like that. ?If you leave off just one of the > > two defaultable parameters, how does it know which? > > Several other SQL systems allow naming the parameters in calls, such as > > CALL foo(a = 1, b = 2) > > That's the only way to stay sane with function having 20 or more > parameters anyway. TODO has: o Allow function parameters to be passed by name, get_employee_salary(12345 AS emp_id, 2001 AS tax_year) -- Bruce Momjian http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +