From: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | filip(at)jirsak(dot)org, PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13810: cursor_to_xml ignores tableforest parameter |
Date: | 2016-08-03 00:03:24 |
Message-ID: | CAEepm=0cOJ0husMuP77jU_Bb5YLSyBj4Qv855n0nWWqnzSnjYw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Wed, Aug 3, 2016 at 5:48 AM, Peter Eisentraut
<peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
> On 12/9/15 9:07 AM, filip(at)jirsak(dot)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?
--
Thomas Munro
http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
cursor-to-xml.patch | application/octet-stream | 2.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2016-08-03 00:14:10 | Re: BUG #14273: Tuple concurently updated error while creating function using async call from node js with postgresq |
Previous Message | David G. Johnston | 2016-08-02 21:42:07 | Re: Fwd: [BUGS] BUG #14247: COMMENT is restored on wrong database |