On Fri, 4 Sept 2026 at 20:16, Andrey Borodin <x4mmm@yandex-team.ru> wrote:
>
> Hi Matthias,
>
> I found one remaining issue in the object-address changes in v2/v3.
> pg_identify_object_as_address() does not produce a value that can be
> passed back to pg_get_object_address():
>
> WITH a AS (
> SELECT *
> FROM pg_identify_object_as_address(
> 'pg_class'::regclass, 'wr_multi'::regclass, -32768)
> )
> SELECT pg_get_object_address(type, object_names, object_args)
> FROM a;
>
> ERROR: unrecognized object type "table whole row"
>
> The documentation describes these functions as inverses.
I'm not convinced they are that. pg_identify_object_as_address() will
happily produce "<relkind> column" output, and with several relkinds
these don't survive a round trip (specifically known failing cases:
indexes, views; for specifics check objectaddress.c's ObjectTypeMap).
But regardless, I've added support for decoding "table whole row" and
"foreign table whole row", which were the only objects that also
supported "<relkind> column", so that the hole isn't any smaller than
that of direct attribute references.
> I think we
> either need to make "table whole row" an addressable object type, or use
> another representation that pg_get_object_address() already understands.
> This case would also make a useful addition to the object_address test.
I've added a OBJECT_WHOLE_ROW type, treated like OBJECT_ATTRIBUTE but
slightly differently, and wired it into some relevant places.
> RememberWholeRowDependentForRebuilding() is a void function, but:
>
> + return RememberAllDependentForRebuilding(tab, subtype, rel,
>
> I think you can just call RememberAllDependentForRebuilding() without a
> return.
Adjusted.
----------------------------------------
Attached is v4, which I believe addresses the feedback received so
far. It does not fix the pre-existing ATPostAlterTypeCleanup issue.
Kind regards,
Matthias van de Meent
Databricks (https://www.databricks.com)