Re: BUG #13810: cursor_to_xml ignores tableforest parameter

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: filip(at)jirsak(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #13810: cursor_to_xml ignores tableforest parameter
Date: 2016-08-02 17:48:10
Message-ID: fd3cc50b-5f07-c1ad-11df-11f12f43eb6c@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

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.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2016-08-02 18:00:11 Re: BUG #14273: Tuple concurently updated error while creating function using async call from node js with postgresq
Previous Message Bruce Momjian 2016-08-02 16:51:16 Re: pg_size_pretty, SHOW, and spaces