Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XWob6-00076J-Du for pgsql-admin@arkaria.postgresql.org; Wed, 24 Sep 2014 15:35:16 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XWob5-0006Bu-BW for pgsql-admin@arkaria.postgresql.org; Wed, 24 Sep 2014 15:35:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XWob4-0006BR-JX for pgsql-admin@postgresql.org; Wed, 24 Sep 2014 15:35:14 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XWob0-00005Y-St for pgsql-admin@postgresql.org; Wed, 24 Sep 2014 15:35:13 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id s8OFZ4Sb017458; Wed, 24 Sep 2014 11:35:04 -0400 From: Tom Lane To: Raj Gandhi cc: David Johnston , pgsql-admin@postgresql.org Subject: Re: format() function with string_agg In-reply-to: References: <1411528144063-5820251.post@n5.nabble.com> Comments: In-reply-to Raj Gandhi message dated "Wed, 24 Sep 2014 10:00:37 -0400" Date: Wed, 24 Sep 2014 11:35:04 -0400 Message-ID: <17457.1411572904@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Raj Gandhi writes: > SQL with VARIADIC also gives the same error in 9.1: > select format('%s %s', VARIADIC array_agg(val)) > from (values ('1'),('2')) src (val) > == > ERROR: too few arguments for format You need 9.3 or later for that to work. Per the 9.3 release notes: * Allow concat() and format() to properly expand VARIADIC-labeled arguments (Pavel Stehule) regards, tom lane -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin