Copy a Param's location field when replacing it with a Const.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Jul 2021 18:15:12 +0000 (14:15 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 14 Jul 2021 18:15:12 +0000 (14:15 -0400)
commitbe850f1822e4b54d1d570eefa8a7242788011634
tree199a03addd1c9a15f3b542cdd13d44eba1ef1812
parentc203dcddf997180000bc574a60313f3437e35af9
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
src/backend/optimizer/util/clauses.c