From: | Lukas Fittl <lukas(at)fittl(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Cc: | Greg Stark <stark(at)mit(dot)edu> |
Subject: | Re: [PATCH] Use $ parameters as replacement characters for pg_stat_statements |
Date: | 2017-03-02 00:12:48 |
Message-ID: | CAP53Pkxbatdf06MfGzkTK-RnzSUga9pxaMVaV9tGBMjBoAgM6Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Mar 1, 2017 at 6:51 AM, Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>
> Hmm, I think this could confuse people into thinking that the queries
> displayed were in fact prepared queries.
>
> Maybe we could gather some more ideas.
>
I think thats a reasonable concern - the main benefit of $1 is that its
already designated as something that can replace a constant, and still be
read by the Postgres parser.
Is there any other character that has the same properties?
I'll also note that Greg Stark mentioned in [0] that "There's another
feature pg_stat_statements *really* needs. A way to convert a jumbled
statement into one that can be prepared easily. The use of ? instead of :1
:2 etc makes this a mechanical but annoying process."
Using $1, $2, etc. for jumbling statements would give us that for free, no
additional effort needed.
[0] https://www.postgresql.org/message-id/CAM-w4HNOeNW6pY_1%
3DLp1aJGMmZ_R6S8JHjqvJMv8-%3DOf3q1q0w%40mail.gmail.com
Best,
Lukas
--
Lukas Fittl
From | Date | Subject | |
---|---|---|---|
Next Message | Kouhei Kaigai | 2017-03-02 00:21:44 | Re: PassDownLimitBound for ForeignScan/CustomScan [take-2] |
Previous Message | Alvaro Herrera | 2017-03-02 00:12:45 | Re: patch: function xmltable |