On Fri, Jun 21, 2024 at 7:42 AM Maxwell Dreytser <Maxwell.Dreytser@xxxxxxxxxxxx> wrote:
I am working on a meta-programming use-case where I need to scrape some detailed information about the results of a function that "RETURNS TABLE (LIKE physical_table)"
Yes, but the bug is yours. The definition you want is: RETURNS SETOF physical_table (not tested though)
What you did was produce a one-column table whose column type is a composite (and whose name is like - what with case-folding of unquoted identifiers). Since that table doesn't exist anywhere in the catalogs it has no TableOID.
David J.