[HACKERS] pg_get_object_address() doesn't support composites - Mailing list pgsql-hackers

From Jim Nasby
Subject [HACKERS] pg_get_object_address() doesn't support composites
Date
Msg-id 5a8f0105-d6b5-079d-47ac-1a3437ac983d@BlueTreble.com
Whole thread Raw
Responses Re: [HACKERS] pg_get_object_address() doesn't support composites  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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.

> ~@decina.local/5621# CREATE TYPE comp AS (a int, b int);
> CREATE TYPE
> ~@decina.local/5621# select * from pg_identify_object_as_address(1259,'comp'::regclass, 0);
>       type      | object_names  | object_args
> ----------------+---------------+-------------
>  composite type | {public,comp} | {}
> (1 row)
>
> ~@decina.local/5621# select * from pg_get_object_address('composite type', '{public,comp}', '{}');
> ERROR:  unsupported object type "composite type"
> ~@decina.local/5621#
-- 
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)



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [HACKERS] Instability in select_parallel regression test
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] pg_get_object_address() doesn't support composites