On Wed, Mar 1, 2017 at 6:51 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.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