[HACKERS] Preserving param location - Mailing list pgsql-hackers

From Julien Rouhaud
Subject [HACKERS] Preserving param location
Date
Msg-id 20170311220932.GJ15188@nol.local
Whole thread Raw
Responses Re: [HACKERS] Preserving param location
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Eric Ridge
Date:
Subject: Re: [HACKERS] How to get the 'ctid' from a record type?
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Need a builtin way to run all tests faster manner