Hello,
When a query contains parameters, the original param node contains the token
location. However, this information is lost when the Const node is generated,
this one will only contain position -1 (unknown).
FWIW, we do have a use case for this (custom extension that tracks quals
statistics, which among other thing is used to regenerate query string from a
pgss normalized query, thus needing the original param location).
Is this something we want to get fixed? If yes, attached is a simple patch for
that.
Regards.
--
Julien Rouhaud
http://dalibo.com - http://dalibo.org
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers