Is anyone able to reproduce?
When I run the query below all 5 rows are returned instead of 2.
Or is this the default behaviour..
PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (GCC) 4.1.2
20080704 (Red Hat 4.1.2-52), 32-bit
DROP TABLE IF EXISTS __pg_test_table CASCADE;
CREATE TABLE
Peter Kroon wrote:
Is anyone able to reproduce?
When I run the query below all 5 rows are returned instead of 2.
Or is this the default behaviour..
SELECT
xmlagg(
[...]
)--xmlagg
FROM __pg_test_table AS dh
WHERE dh.__rel=5 LIMIT 2 --OFFSET 10;
According to the documentation, that query
This is how I solved it:
SELECT
xmlagg(
xmlconcat(
xmlelement(name test_element,
xmlforest(
ff.d AS a
)--xmlforest
)
)--xmlconcat
)--xmlagg
FROM (
SELECT
--xmlagg(
xmlconcat(
xmlelement(name test_element,
xmlattributes(
0 AS m
),
xmlforest(
dh.id AS i
,dh.some_value AS sv
)--xmlforest