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

From Peter Geoghegan
Subject Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)
Date
Msg-id CAM3SWZQ3R-t2WDBiFx5TFme4eKKmT0safCoB1oaA3e3UCdfr0w@mail.gmail.com
Whole thread Raw
In response to Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Responses Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On Tue, Nov 24, 2015 at 5:39 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> 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..

They do?

postgres=# select 5::int4 in ('5');?column?
──────────t
(1 row)

postgres=# select 5::int4 in ('5a');
ERROR:  22P02: invalid input syntax for integer: "5a"
LINE 1: select 5::int4 in ('5a');                          ^
--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: Using quicksort for every external sort run
Next
From: Greg Stark
Date:
Subject: Re: New email address