Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr)
От | Jim Nasby |
---|---|
Тема | Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr) |
Дата | |
Msg-id | 56555B72.40201@BlueTreble.com обсуждение исходный текст |
Ответ на | Re: Revisiting pg_stat_statements and IN() (Was: Re: pg_stat_statements fingerprinting logic and ArrayExpr) (Peter Geoghegan <pg@heroku.com>) |
Ответы |
Re: Revisiting pg_stat_statements and IN() (Was: Re:
pg_stat_statements fingerprinting logic and ArrayExpr)
|
Список | pgsql-hackers |
On 11/24/15 7:46 PM, Peter Geoghegan wrote: > 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'); > ^ I'm not following your point. Obviously you can't compare int to text that doesn't convert back to an int, but that's not what I was talking about. -- 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 по дате отправления: