Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 33ED16332AC for ; Sat, 25 Apr 2009 00:09:43 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 60389-10 for ; Sat, 25 Apr 2009 00:09:40 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 1C4EC632982 for ; Sat, 25 Apr 2009 00:09:39 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n3P39cqW025089; Fri, 24 Apr 2009 23:09:39 -0400 (EDT) To: Chris Ruprecht cc: pgsql-sql@postgresql.org Subject: Re: Variable number or arguments to a function possible? In-reply-to: <08F9706F-C603-46A2-8D42-5799D700DCE7@ruprecht.org> References: <08F9706F-C603-46A2-8D42-5799D700DCE7@ruprecht.org> Comments: In-reply-to Chris Ruprecht message dated "Fri, 24 Apr 2009 22:04:54 -0400" Date: Fri, 24 Apr 2009 23:09:38 -0400 Message-ID: <25088.1240628978@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/115 X-Sequence-Number: 32461 Chris Ruprecht writes: > Is it possible to create a function that can take a variable number of > arguments? No, but you can make it take an array and then write something like myfunc(array[x, y, ...]) 8.4 will have some syntactic sugar that looks like variable numbers of arguments, but it's reducing to the above underneath. regards, tom lane