Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d65z2-0005eR-U3 for pgsql-bugs@arkaria.postgresql.org; Thu, 04 May 2017 01:55:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d65z2-00051b-GS for pgsql-bugs@arkaria.postgresql.org; Thu, 04 May 2017 01:55:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d65z1-0004wk-PR for pgsql-bugs@postgresql.org; Thu, 04 May 2017 01:55:08 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d65yy-0003uM-OZ for pgsql-bugs@postgresql.org; Thu, 04 May 2017 01:55:06 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 6E04620A0D; Wed, 3 May 2017 21:55:03 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Wed, 03 May 2017 21:55:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=rxW7hYNL/ckF/4hx3q5UZu1tJ+TVIusoNbAKGEXUI+I=; b=mIrkYSza 2QMSAJUwSerLVyMh8k/2ODGnb4a/pD/o0NBmfjbgf9zWVLJwFMrfynHl+PzG0SsM iNhE5Fzey1633QqgVh1ukCfyhn5xNSRP0dxvHMzTrzI23ukZYdJWWjAEOSbd9mOl qymXVwUzxX+os1iWI3QkO87R8axh0rgjRGTUeAxzhdwfsukMafcvzV2Z27tUQyOW yDhYZgeXkp4sonaJ6MPn2RERP/Bu/jcUe/QsaBOCTqICeEv90LbD5Xz9qISVqgzD a9VKTS2j5kz0lKVR9ZJ4wr4m3zOF/FHO0f+AY7ymVIGQlOaDqR5tb4GowpdJOJPV NaabzOFM7F9leg== X-ME-Sender: X-Sasl-enc: 165rlOcgOBo6n4aFlWdUT3XYypBxCb8Bmivnkytm8ZGY 1493862903 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 3B87A7E316; Wed, 3 May 2017 21:55:03 -0400 (EDT) Subject: Re: BUG #13810: cursor_to_xml ignores tableforest parameter To: Thomas Munro References: <20151209140708.877.66922@wrigleys.postgresql.org> Cc: filip@jirsak.org, PostgreSQL Bugs From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com> Date: Wed, 3 May 2017 21:55:02 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 On 8/2/16 20:03, Thomas Munro wrote: > On Wed, Aug 3, 2016 at 5:48 AM, Peter Eisentraut > wrote: >> On 12/9/15 9:07 AM, filip@jirsak.org wrote: >>> CREATE FUNCTION test_cursor_to_xml() RETURNS xml AS $$ >>> DECLARE >>> curs CURSOR FOR SELECT generate_series(1, 5); >>> BEGIN >>> OPEN curs; >>> RETURN cursor_to_xml(curs, 10, TRUE, FALSE, ''); >>> END; >>> $$ LANGUAGE plpgsql; >>> >>> SELECT test_cursor_to_xml(); >>> >>> >>> This returns XML forrest instead of XML document with single root. >> >> You're right, this should have a ...
around it, like >> query_to_xml() does. > > Then it would have to use the cursor name, not a table name, like this, right? [older thread] I have applied a fix for this to master. I'll let the build farm take it for a spin and then apply it to the backbranches. (We don't use the cursor name for the element name. It's documented to use just "table".) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs