pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Thomas Munro <thomas.munro@enterprisedb.com>
Cc: filip@jirsak.org, PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13810: cursor_to_xml ignores tableforest parameter
Date: Wed, 3 May 2017 21:55:02 -0400
Message-ID: <5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com> (raw)
In-Reply-To: <CAEepm=0cOJ0husMuP77jU_Bb5YLSyBj4Qv855n0nWWqnzSnjYw@mail.gmail.com>
References: <20151209140708.877.66922@wrigleys.postgresql.org>
	<fd3cc50b-5f07-c1ad-11df-11f12f43eb6c@2ndquadrant.com>
	<CAEepm=0cOJ0husMuP77jU_Bb5YLSyBj4Qv855n0nWWqnzSnjYw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 8/2/16 20:03, Thomas Munro wrote:
> On Wed, Aug 3, 2016 at 5:48 AM, Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com> 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 <table>...</table> 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



view thread (8+ messages)  latest in thread

Message-ID: <5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com>
Permalink:  ../5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com/
Also on:    postgresql.org/message-id/5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: peter.eisentraut@2ndquadrant.com, thomas.munro@enterprisedb.com
  Subject: Re: BUG #13810: cursor_to_xml ignores tableforest parameter
  In-Reply-To: <5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com>
  References: <20151209140708.877.66922@wrigleys.postgresql.org> <fd3cc50b-5f07-c1ad-11df-11f12f43eb6c@2ndquadrant.com> <CAEepm=0cOJ0husMuP77jU_Bb5YLSyBj4Qv855n0nWWqnzSnjYw@mail.gmail.com> <5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox