Re: patch: function xmltable

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Craig Ringer <craig(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: function xmltable
Date: 2016-11-23 16:54:48
Message-ID: 20161123165448.wwqwzkm7y5uyothp@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I tried to see if a following RTE was able to "see" the entries created by
XMLTABLE, and sure it can:

SELECT X.*, generate_series
FROM emp,
XMLTABLE ('//depts/dept/employee' passing doc
COLUMNS
empID INTEGER PATH '@id',
firstname varchar(25) PATH 'name/first',
lastname VARCHAR(25) PATH 'name/last') AS X,
generate_series(900, empid);

empid │ firstname │ lastname │ generate_series
───────┼───────────┼──────────┼─────────────────
901 │ John │ Doe │ 900
901 │ John │ Doe │ 901
902 │ Peter │ Pan │ 900
902 │ Peter │ Pan │ 901
902 │ Peter │ Pan │ 902
903 │ Mary │ Jones │ 900
903 │ Mary │ Jones │ 901
903 │ Mary │ Jones │ 902
903 │ Mary │ Jones │ 903
(9 filas)

Cool.

I'm still wondering how this works. I'll continue to explore the patch
in order to figure out.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-11-23 16:58:32 Re: postgres 9.3 postgres_fdw ::LOG: could not receive data from client: Connection reset by peer
Previous Message Catalin Iacob 2016-11-23 16:49:29 Re: Patch: Implement failover on libpq connect level.