Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr) - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)
Date
Msg-id 5655113B.6090406@BlueTreble.com
Whole thread Raw
In response to Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)  (Peter Geoghegan <pg@heroku.com>)
List pgsql-hackers
On 11/24/15 1:29 PM, Tom Lane wrote:
> So I suspect the real problem here is that we might want all of these
> things to look identical to pg_stat_statements:
>
>         ARRAY[$1, $2, 42]
>         ARRAY[$1, $2, $3, 47]
>         '{1,2,3,47}'::int[]
>
> Don't see a very clean way to do that ...

Another not-uncommon case is IN ( '1', '2', ... , '2342' ); in other 
words, treating an integer as text. A lot of frameworks like to do that 
and just push the problem onto the database. I'm not sure what 
pg_stat_statements would ultimately see in that case..

Since there's a few different things people might want, maybe a good 
first step is to allow extending/changing the jumbling decision at the C 
level. That would make it easy for a knowledgeable enough person to come 
up with an alternative as a plugin that regular users could use.
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: WIP: About CMake v2
Next
From: Greg Stark
Date:
Subject: Re: Using quicksort for every external sort run