Re: Pathify RHS unique-ification for semijoin planning

wenhui qiu <qiuwenhuifx@gmail.com>

From: wenhui qiu <qiuwenhuifx@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Alexandra Wang <alexandra.wang.oss@gmail.com>, Álvaro Herrera <alvherre@kurilemu.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Tom Lane <tgl@sss.pgh.pa.us>, Andy Fan <zhihuifan1213@163.com>
Date: 2025-08-08T02:21:40Z
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 →
  1. Simplify relation_has_unique_index_for()

  2. Pathify RHS unique-ification for semijoin planning

  3. Convert varatt.h access macros to static inline functions.

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

Hi Richard
    Thanks for your feedback. I agree this approach is better for keeping
the code style consistent.


Thanks

On Fri, Aug 8, 2025 at 9:39 AM Richard Guo <guofenglinux@gmail.com> wrote:

> On Thu, Aug 7, 2025 at 6:04 PM wenhui qiu <qiuwenhuifx@gmail.com> wrote:
> > In light of this commit (
> https://github.com/postgres/postgres/commit/e035863c9a04beeecc254c3bfe48dab58e389e10),
> I also recommend changing the macro to a static inline function. Macros are
> harder to debug and lack type safety.
>
> I'm inclined not to do that.  We already have other macros for
> checking whether a relation is of a certain kind, and I'd prefer to
> keep the new check consistent with those.
>
> Thanks
> Richard
>