postgresql/src/backend
Alvaro Herrera fcec6caafa Support XMLTABLE query expression
XMLTABLE is defined by the SQL/XML standard as a feature that allows
turning XML-formatted data into relational form, so that it can be used
as a <table primary> in the FROM clause of a query.

This new construct provides significant simplicity and performance
benefit for XML data processing; what in a client-side custom
implementation was reported to take 20 minutes can be executed in 400ms
using XMLTABLE.  (The same functionality was said to take 10 seconds
using nested PostgreSQL XPath function calls, and 5 seconds using
XMLReader under PL/Python).

The implemented syntax deviates slightly from what the standard
requires.  First, the standard indicates that the PASSING clause is
optional and that multiple XML input documents may be given to it; we
make it mandatory and accept a single document only.  Second, we don't
currently support a default namespace to be specified.

This implementation relies on a new executor node based on a hardcoded
method table.  (Because the grammar is fixed, there is no extensibility
in the current approach; further constructs can be implemented on top of
this such as JSON_TABLE, but they require changes to core code.)

Author: Pavel Stehule, Álvaro Herrera
Extensively reviewed by: Craig Ringer
Discussion: https://postgr.es/m/CAFj8pRAgfzMD-LoSmnMGybD0WsEznLHWap8DO79+-GTRAPR4qA@mail.gmail.com
2017-03-08 12:40:26 -03:00
..
access tidbitmap: Support shared iteration. 2017-03-08 08:09:38 -05:00
bootstrap Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
catalog Fix segfault in ALTER PUBLICATION/SUBSCRIPTION RENAME 2017-03-07 22:44:59 -05:00
commands Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
executor Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
foreign Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
lib Fix overflow check in StringInfo; add missing casts 2017-01-10 11:41:13 -03:00
libpq Fix comments in SCRAM-SHA-256 patch. 2017-03-07 15:24:27 +02:00
main Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
nodes Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
optimizer Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
parser Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
po Translation updates 2016-08-08 11:08:00 -04:00
port Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
postmaster Fix user-after-free bug. 2017-03-06 12:13:57 -05:00
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Ensure ThisTimeLineID is valid before START_REPLICATION 2017-03-07 21:06:09 +08:00
rewrite Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
snowball Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
storage tidbitmap: Support shared iteration. 2017-03-08 08:09:38 -05:00
tcop Disallow CREATE/DROP SUBSCRIPTION in transaction block 2017-03-03 23:29:13 -05:00
tsearch Fix typos in comments. 2017-02-06 11:33:58 +02:00
utils Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Remove maintainer-check target, fold into normal build 2013-10-10 20:11:56 -04:00
Makefile Fix parallel make issue with new fmgrprotos.h 2017-01-23 15:36:27 -05:00
nls.mk Remove trailing slashes from directories in find command 2015-09-18 22:06:54 -04:00