Re: Allowing extensions to supply operator-/function-specific info
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@lists.postgresql.org
Date: 2019-01-26T17:35:31Z
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 →
-
Allow extensions to generate lossy index conditions.
- 74dfe58a5927 12.0 landed
-
Build out the planner support function infrastructure.
- a391ff3c3d41 12.0 landed
-
Create the infrastructure for planner support functions.
- 1fb57af92069 12.0 landed
-
Disable transforms that replaced AT TIME ZONE with RelabelType.
- c22ecc6562aa 10.0 cited
Attachments
- v1-0004-unnest-and-gen-series-support.patch (text/x-diff) patch v1-0004
I wrote: > There's a considerable amount of follow-up work that ought to happen > now to make use of these capabilities for places that have been > pain points in the past, such as generate_series() and unnest(). > But I haven't touched that yet. Attached is an 0004 that makes a stab at providing some intelligence for unnest() and the integer cases of generate_series(). This only affects one plan choice in the existing regression tests; I tweaked that test to keep the plan the same. I didn't add new test cases demonstrating the functionality, since it's a bit hard to show it directly within the constraints of EXPLAIN (COSTS OFF). We could do something along the lines of the quick-hack rowcount test in 0003, perhaps, but that's pretty indirect. Looking at this, I'm dissatisfied with the amount of new #include's being dragged into datatype-specific .c files. I don't really want to end up with most of utils/adt/ having dependencies on planner data structures, but that's where we would be headed. I can think of a couple of possibilities: * Instead of putting support functions beside their target function, group all the core's support functions into one new .c file. I'm afraid this would lead to the reverse problem of having to import lots of datatype-private info into that file. * Try to refactor the planner's .h files so that there's just one "external use" header providing stuff like estimate_expression_value, while keeping PlannerInfo as an opaque struct. Then importing that into utils/adt/ files would not represent such a big dependency footprint. I find the second choice more appealing, though it's getting a bit far afield from where this started. OTOH, lots of other header refactoring is going on right now, so why not ... Thoughts? regards, tom lane