Re: pg_stat_statements and "IN" conditions
David Geier <geidav.pg@gmail.com>
From: David Geier <geidav.pg@gmail.com>
To: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Sergei Kornilov <sk@zsrv.org>, Michael Paquier <michael@paquier.xyz>,
Alvaro Herrera <alvherre@alvh.no-ip.org>, Marcos Pegoraro
<marcos@f10.com.br>, vignesh C <vignesh21@gmail.com>,
Robert Haas <robertmhaas@gmail.com>, Zhihong Yu <zyu@yugabyte.com>,
David Steele <david@pgmasters.net>,
PostgreSQL-development <pgsql-hackers@postgresql.org>,
Greg Stark <stark@mit.edu>, Pavel Trukhanov <pavel.trukhanov@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>
Date: 2023-02-23T08:48:35Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Introduce squashing of constant lists in query jumbling
- 62d712ecfd94 18.0 landed
-
Make documentation builds reproducible
- b0f0a9432d0b 17.0 cited
-
Include values of A_Const nodes in query jumbling
- 9ba37b2cb6a1 16.0 cited
-
Teach planner about more monotonic window functions
- 456fa635a909 16.0 cited
-
Split up guc.c for better build speed and ease of maintenance.
- 0a20ff54f5e6 16.0 cited
Hi, >> Seems like supporting only constants is a good starting >> point. The only thing that is likely confusing for users is that NUMERICs >> (and potentially constants of other types) are unsupported. Wouldn't it be >> fairly simple to support them via something like the following? >> >> is_const(element) || (is_coercion(element) && is_const(element->child)) > It definitely makes sense to implement that, although I don't think it's > going to be acceptable to do that via directly listing conditions an > element has to satisfy. It probably has to be more flexible, sice we > would like to extend it in the future. My plan is to address this in a > follow-up patch, when the main mechanism is approved. Would you agree > with this approach? I still think it's counterintuitive and I'm pretty sure people would even report this as a bug because not knowing about the difference in internal representation you would expect NUMERICs to work the same way other constants work. If anything we would have to document it. Can't we do something pragmatic and have something like IsMergableInElement() which for now only supports constants and later can be extended? Or what exactly do you mean by "more flexible"? -- David Geier (ServiceNow)