Re: RowDescription for a function does not include table OID - Mailing list pgsql-general

From Maxwell Dreytser
Subject Re: RowDescription for a function does not include table OID
Date
Msg-id LV3PR16MB6001FF31889B0B0DD4EF6476E6C92@LV3PR16MB6001.namprd16.prod.outlook.com
Whole thread Raw
In response to Re: RowDescription for a function does not include table OID  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: RowDescription for a function does not include table OID
List pgsql-general
On Friday, June 21, 2024 10:48 AM David G. Johnston <david.g.johnston@gmail.com>wrote:

>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-foldingof unquoted identifiers).  Since that table doesn't exist anywhere in the catalogs it has no TableOID. 

SETOF also does not return correct RowDescription data. Table OID and column number are still both 0.
Both versions have the exact same pg_proc.prorettype. If I join this onto pg_type, the pg_type.typrelid =
'physical_table'::regclass.

Regards,
Maxwell


pgsql-general by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: RowDescription for a function does not include table OID
Next
From: "David G. Johnston"
Date:
Subject: Re: RowDescription for a function does not include table OID