Re: pg_get_object_address() doesn't support composites

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_get_object_address() doesn't support composites
Date: 2017-02-19 23:28:31
Message-ID: ebdd70df-b38f-4f32-7b6d-ab76e76a9331@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2/18/17 4:26 PM, Jim Nasby wrote:
> On 2/17/17 9:53 PM, Alvaro Herrera wrote:
>> Jim Nasby wrote:
>>> See below. ISTM that pg_get_object_address should support everything
>>> pg_identify_object_as_address can output, no?
>>>
>>> I'm guessing the answer here is to have pg_identify_object_as_address
>>> complain if you ask it for something that's not mapable.
>> Yes, I think we should just reject the case in
>> pg_identify_object_as_address.
>
> Attached patch does that, and tests for it. Note that there were some
> unsupported types that were not being tested before. I've added a
> comment requesting people update the test if they add more types.

While testing a view on pg_depend, I discovered this has the unfortunate
side-effect of meaning you can no longer use
pg_identify_object_as_address against pg_depend.ref*. Using it against
pg_depend was already problematic though, because it throws an error on
the pinned objects if you try and hand it classid, objid or objsubid. So
maybe it's OK.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kouhei Kaigai 2017-02-20 00:25:08 Re: ParallelFinish-hook of FDW/CSP (Re: Steps inside ExecEndGather)
Previous Message Gilles Darold 2017-02-19 23:07:13 Re: Patch to implement pg_current_logfile() function