Preserving param location

From: Julien Rouhaud <julien(dot)rouhaud(at)dalibo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Preserving param location
Date: 2017-03-11 22:09:32
Message-ID: 20170311220932.GJ15188@nol.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


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


Julien Rouhaud -

Attachment Content-Type Size
fix_param_location-1.diff text/plain 996 bytes


Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-03-11 22:17:42 Re: Need a builtin way to run all tests faster manner
Previous Message Eric Ridge 2017-03-11 21:58:00 Re: How to get the 'ctid' from a record type?