pg_get_object_address() doesn't support composites

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: pg_get_object_address() doesn't support composites
Date: 2017-02-18 03:19:25
Message-ID: 5a8f0105-d6b5-079d-47ac-1a3437ac983d@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2017-02-18 03:53:07 Re: pg_get_object_address() doesn't support composites
Previous Message Amit Kapila 2017-02-18 02:57:21 Re: Instability in select_parallel regression test