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

From Julien Rouhaud
Subject Re: [HACKERS] Preserving param location
Date
Msg-id 20210627033539.53gfcixzd3u5yl4j@nol
Whole thread Raw
In response to Re: [HACKERS] Preserving param location  (Julien Rouhaud <rjuju123@gmail.com>)
Responses Re: [HACKERS] Preserving param location
List pgsql-hackers
On Sun, Jun 27, 2021 at 11:31:53AM +0800, Julien Rouhaud wrote:
> On Sat, Mar 11, 2017 at 11:09:32PM +0100, Julien Rouhaud wrote:
> > 
> > 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).
> 
> rebased v2.

This time with the patch.

Attachment

pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: [HACKERS] Preserving param location
Next
From: Julien Rouhaud
Date:
Subject: Deparsing rewritten query