Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)
Date: 2015-11-25 01:39:07
Message-ID: 5655113B.6090406@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-11-25 01:39:16 Re: WIP: About CMake v2
Previous Message Peter Geoghegan 2015-11-25 01:24:22 Re: Using quicksort for every external sort run