Re: pg_stat_statements and "IN" conditions
От | Dmitry Dolgov |
---|---|
Тема | Re: pg_stat_statements and "IN" conditions |
Дата | |
Msg-id | sxlb7ftpomzzhdoigjflnya7az3utoo4rf5jnk54wst7imqywe@zxkuyhcq4njb обсуждение исходный текст |
Ответ на | Re: pg_stat_statements and "IN" conditions (Álvaro Herrera <alvherre@alvh.no-ip.org>) |
Список | pgsql-hackers |
> On Wed, Feb 12, 2025 at 07:39:39PM GMT, Álvaro Herrera wrote: > The nastiness level of this seems quite low, compared to what happens to > this other example if we didn't handle these easy cases: > > create table t (a float); > select i from t where i in (1, 2); > select i from t where i in (1, '2'); > select i from t where i in ('1', 2); > select i from t where i in ('1', '2'); > select i from t where i in (1.0, 1.0); Yep, the current version I've got so far produces the same pg_stat_statements entry for all of those queries. I'm going to move out the renamed GUC and post the new patch tomorrow. > If I understand what you're saying, it's that the extra parenthesis > cause the recorded query text be a little uglier (but the queryid still > ends up being one and the same for all queries), which seems much less > of a problem. Right, that's correct. After thinking a bit more I think this ugliness could be addressed easier, if we take into account that all of that is happening withing a list of elements with more or less strict format.
В списке pgsql-hackers по дате отправления: