Re: [BUGS] BUG #13810: cursor_to_xml ignores tableforest parameter - Mailing list pgsql-bugs

From Peter Eisentraut
Subject Re: [BUGS] BUG #13810: cursor_to_xml ignores tableforest parameter
Date
Msg-id 5733c7bd-f8f8-2c9c-01b3-6c3f2760fa88@2ndquadrant.com
Whole thread Raw
In response to Re: BUG #13810: cursor_to_xml ignores tableforest parameter  (Thomas Munro <thomas.munro@enterprisedb.com>)
Responses Re: [BUGS] BUG #13810: cursor_to_xml ignores tableforest parameter  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Re: [BUGS] BUG #13810: cursor_to_xml ignores tableforest parameter  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-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

pgsql-bugs by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: [HACKERS] Re: [BUGS] BUG #14634: On Windows pg_basebackup shouldwrite tar to stdout in binary mode
Next
From: Peter Eisentraut
Date:
Subject: Re: [BUGS] Concurrent ALTER SEQUENCE RESTART Regression