Thread: pgsql: Copy a Param's location field when replacing it with a Const.

pgsql: Copy a Param's location field when replacing it with a Const.

From
Tom Lane
Date:
Copy a Param's location field when replacing it with a Const.

This allows Param substitution to produce just the same result
as writing a constant value literally would have done.  While
it hardly matters so far as the current core code is concerned,
extensions might take more interest in node location fields.

Julien Rouhaud

Discussion: https://postgr.es/m/20170311220932.GJ15188@nol.local

Branch
------
master

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

Modified Files
--------------
src/backend/optimizer/util/clauses.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)