On Mon, Aug 18, 2025 at 3:07 PM Richard Guo <guofengli...@gmail.com> wrote:
> Here's the updated version of the patch, which renames the macro
> IS_UNIQUEIFIED_REL to RELATION_WAS_MADE_UNIQUE, and includes some
> comment updates as well.  I plan to push it soon, barring any
> objections.

Pushed.

> This patch removes the last call to make_sort_from_sortclauses(), so
> I'm wondering if we can safely remove the function itself.  Or should
> we keep it around in case it's used by extensions or might be needed
> in the future?

This function, along with two other make_xxx() functions from
createplan.c, was exported in 570be1f73 because CitusDB was using
them.

commit 570be1f73f385abb557bda15b718d7aac616cc15
Author: Tom Lane <t...@sss.pgh.pa.us>
Date:   Sat Mar 12 12:12:59 2016 -0500

    Re-export a few of createplan.c's make_xxx() functions.

    CitusDB is using these and don't wish to redesign their code right now.
    I am not on board with this being a good idea, or a good precedent,
    but I lack the energy to fight about it.

I actually agree with Tom that it's not a good idea to create Plan
nodes outside of createplan.c; instead, one should construct a Path
tree and let create_plan() convert it into Plan nodes.

I'm not sure whether CitusDB has redesigned their code in this way,
but for now, I prefer not to remove make_sort_from_sortclauses() just
to be safe.

Thanks
Richard


Reply via email to