postgresql/src/include
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 Remove inclusion of postgres.h from a few header files. 2017-03-08 08:18:12 -05:00
bootstrap Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
catalog Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
commands Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
common Fix comments in SCRAM-SHA-256 patch. 2017-03-07 15:24:27 +02:00
datatype Consistently declare timestamp variables as TimestampTz. 2017-02-23 15:57:08 -05:00
executor Support XMLTABLE query expression 2017-03-08 12:40:26 -03:00
fe_utils Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
foreign Allow custom and foreign scans to have shutdown callbacks. 2017-02-26 13:41:12 +05:30
lib Make simplehash.h grow hashtable in additional cases. 2017-03-06 14:13:06 -08:00
libpq Fix comments in SCRAM-SHA-256 patch. 2017-03-07 15:24:27 +02:00
mb 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
port Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
portability Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postmaster Add pg_current_logfile() function. 2017-03-03 11:43:11 +05:30
regex Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
replication Use the new "Slab" context for some allocations in reorderbuffer.h. 2017-02-27 03:41:44 -08:00
rewrite Remove deprecated COMMENT ON RULE syntax 2017-02-23 08:19:52 -05: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 Add a new DestReceiver for printing tuples without catalog access. 2017-01-24 16:53:56 -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 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h De-support floating-point timestamps. 2017-02-23 11:40:20 -05:00
fmgr.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
funcapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getaddrinfo.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
getopt_long.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Generate fmgr prototypes automatically 2017-01-17 14:06:07 -05:00
miscadmin.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_config.h.in Remove some configure header-file checks that we weren't really using. 2017-02-25 18:10:09 -05:00
pg_config.h.win32 Remove some configure header-file checks that we weren't really using. 2017-02-25 18:10:09 -05:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Fix default minimum value for descending sequences 2017-01-23 14:00:58 -05:00
pg_getopt.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pg_trace.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgstat.h Use asynchronous connect API in libpqwalreceiver 2017-03-03 09:13:58 -05:00
pgtar.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
pgtime.h Fix incorrect comment: pgtime's tm_mon is 1-based, not 0-based. 2017-01-24 09:36:17 -05:00
port.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
postgres_ext.h Move atooid() definition to a central place 2017-03-01 11:55:28 -05:00
postgres_fe.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
rusagestub.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
windowapi.h Update copyright via script for 2017 2017-01-03 13:48:53 -05:00