Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X4B49-0007CG-Ja for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jul 2014 15:42:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X4B48-0007pJ-WC for pgsql-bugs@arkaria.postgresql.org; Mon, 07 Jul 2014 15:42:53 +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 1X4B48-0007pB-As for pgsql-bugs@postgresql.org; Mon, 07 Jul 2014 15:42:52 +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 1X4B45-0005j3-7d for pgsql-bugs@postgresql.org; Mon, 07 Jul 2014 15:42:51 +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 s67Fgkf8023770; Mon, 7 Jul 2014 11:42:46 -0400 From: Tom Lane To: David G Johnston cc: pgsql-bugs@postgresql.org Subject: Re: BUG #10889: Cannot add 2 floats from regular expression In-reply-to: <1404746726037-5810751.post@n5.nabble.com> References: <20140707135824.2752.47779@wrigleys.postgresql.org> <1404746726037-5810751.post@n5.nabble.com> Comments: In-reply-to David G Johnston message dated "Mon, 07 Jul 2014 08:25:26 -0700" Date: Mon, 07 Jul 2014 11:42:46 -0400 Message-ID: <23769.1404747766@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-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org David G Johnston writes: > Suggest wrapping it in a function - or making a "regexp_matches_single" > function that behaves similarly but returns a single text[] instead of a > SETOF text[] I wonder if we should have such a thing built-in. This isn't the first complaint we've heard about the SETOF API being awkward to use, and it's only needed if you specify the 'g' flag. Perhaps we could have a variant that forbids 'g' and returns a non-set (either the single match, or NULL). regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs