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

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: eaaa5986ad03f7871fa95878460e1132cb7e8963
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2019-03-07T14:20:35Z
Releases: 12.0
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

Files

PathChange+/−
doc/src/sgml/func.sgml modified +25 −14
src/backend/catalog/sql_features.txt modified +2 −2
src/backend/parser/gram.y modified +10 −5

Documentation touched

Discussion