Thread: pgsql: Fix the BY {REF,VALUE} clause of XMLEXISTS/XMLTABLE

pgsql: Fix the BY {REF,VALUE} clause of XMLEXISTS/XMLTABLE

From
Alvaro Herrera
Date:
Fix the BY {REF,VALUE} clause of XMLEXISTS/XMLTABLE

This clause is used to indicate the passing mode of a XML document, but
we were doing it wrong: we accepted BY REF and ignored it, and rejected
BY VALUE as a syntax error.  The reality, however, is that documents are
always passed BY VALUE, so rejecting that clause was silly.  Change
things so that we accept BY VALUE.

BY REF continues to be accepted, and continues to be ignored.

Author: Chapman Flack
Reviewed-by: Pavel Stehule
Discussion: https://postgr.es/m/5C297BB7.9070509@anastigmatix.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/eaaa5986ad03f7871fa95878460e1132cb7e8963

Modified Files
--------------
doc/src/sgml/func.sgml               | 39 +++++++++++++++++++++++-------------
src/backend/catalog/sql_features.txt |  4 ++--
src/backend/parser/gram.y            | 15 +++++++++-----
3 files changed, 37 insertions(+), 21 deletions(-)