X-Original-To: pgsql-sql@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 09330925B9D for ; Sun, 1 Jun 2003 11:22:17 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193]) (amavisd-new, port 10024) with ESMTP id 30781-06 for ; Sun, 1 Jun 2003 11:22:06 -0400 (EDT) Received: from cfftechnologies.com (dsl081-147-127.chi1.dsl.speakeasy.net [64.81.147.127]) by developer.postgresql.org (Postfix) with ESMTP id 387E4925A9B for ; Sun, 1 Jun 2003 11:22:06 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by cfftechnologies.com (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id 4697820C0A9 for ; Sun, 1 Jun 2003 10:17:54 -0500 (CDT) Received: from cfftechnologies.com ([127.0.0.1]) by localhost (coral [127.0.0.1]) (amavisd-new) with ESMTP id 12273-04 for ; Sun, 1 Jun 2003 10:17:53 -0000 (CDT) Received: from CFFtechnologies.com (dhcp109.cfftechnologies.world [192.168.129.109]) by cfftechnologies.com (Postfix on SuSE Linux 8.0 (i386)) with ESMTP id 5416A20C09A for ; Sun, 1 Jun 2003 10:17:53 -0500 (CDT) Date: Sun, 1 Jun 2003 10:21:36 -0500 Subject: Re: generic return for functions Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Avi Schwartz To: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit In-Reply-To: <1054470071.11968.115.camel@jester> Message-Id: X-Mailer: Apple Mail (2.552) X-Virus-Scanned: by amavisd-new amavisd-new-20020630 X-Razor-id: 188958e9bad749b9285a1b7df53be8a3b05d8a2c X-Virus-Scanned: by amavisd-new X-Archive-Number: 200306/6 X-Sequence-Number: 13764 Exactly. It is used with named parameters when the parameter is not provided. Avi On Sunday, Jun 1, 2003, at 07:21 America/Chicago, Rod Taylor wrote: >> thing that causes me some minor grief is the fact that currently you >> cannot have default values to function parameters, a feature we use a >> lot. > > The default value is used when the parameter is NULL or unprovided? > > fn(integer, integer, integer default 32) > > select fn(integer, integer); <- Third argument would be '32'? > > > When PostgreSQL gets named parameters the above probably makes sense to > add. > > A TODO item? -- Avi Schwartz avi@CFFtechnologies.com