Re: Feedback on table expansion hook (including patch)

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Development <pgsql-hackers@postgresql.org>
Cc: Erik Nordström <erik@timescale.com>, David Fetter <david@fetter.org>, Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Date: 2021-05-11T12:29:45Z
Lists: pgsql-hackers
Hi Erik,

> Thank you all for the feedback and insights.
>
> Yes, the intention is to *replace* expand_inherited_rtentry() in the same way planner_hook replaces standard_planner().

This patch probably doesn't need yet another reviewer, but since there
is a little controversy about if the hook should replace a procedure
or be called after it, I decided to put my two cents in. The proposed
approach is very flexible - it allows to modify the arguments, the
result, to completely replace the procedure, etc. I don't think that
calling a hook after the procedure was called (or before) will be very
useful.

The patch applies to `master` branch (6d177e28) and passes all the
tests on MacOS.

-- 
Best regards,
Aleksander Alekseev



Commits

  1. doc: PG 13 relnotes, update TOAST item to mention decompression