RowDescription for a function does not include table OID

From: Maxwell Dreytser <Maxwell(dot)Dreytser(at)assistek(dot)com>
To: "pgsql-interfaces(at)lists(dot)postgresql(dot)org" <pgsql-interfaces(at)lists(dot)postgresql(dot)org>
Subject: RowDescription for a function does not include table OID
Date: 2024-06-18 03:18:40
Message-ID: LV3PR16MB6001AF4D05893E9FF4B3C746E6CE2@LV3PR16MB6001.namprd16.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

Hello,

I am working on a meta-programming use-case where I need to scrape some detailed information about the results of a function call that "RETURNS TABLE (LIKE physical_table)". Unfortunately RowDescription messages don't contain nearly enough information (no nullability). In pg_type the pg_proc.prorettype of this function shows up as a composite type with a valid typrelid. I am interested in getting this typrelid in the RowDescription field table OID field and the respective attribute number field. This would allow me to figure out all the necessary information by looking up in pg_attribute.

If this is something that might be accepted, I would be willing to work on a patch to implement this change.

Thank you,
Maxwell.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2024-06-18 03:51:18 Re: RowDescription for a function does not include table OID
Previous Message Дмитрий Питаков 2024-06-17 18:46:51

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2024-06-18 03:51:18 Re: RowDescription for a function does not include table OID
Previous Message Ibrahim Shaame 2024-04-08 13:55:26 can't run setup.py in pgAdmin4