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 LV3PR16MB60016206D56BF62B51D0568BE6C92@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 11:28 AM David G. Johnston <david.g.johnston@gmail.com> wrote:

> Interesting, then I suppose it is semantics.  There is no table involved - you are referencing the type of that name,
notthe table - so no TableOID.  There is no guarantee the row you are holding came from a table - and I'd interpret the
currentbehavior as conveying that fact.  Though the current wording: "If the field can be identified as a column of a
specifictable, the object ID of the table; otherwise zero."; and the observation that at least a human "can identify" a
relatedcolumn, leads one to reasonably infer the system should be able to make such an identification as well. 

This is exactly my point. If the return type of the function is strongly linked (directly in the function schema) to
thetable according to pg_catalog, the field can obviously be tied to a specific column of that specific table. The
RowDescriptionnot having that value filled in is a violation of that promise. 

> In short, the system doesn't generate the information you need, where you need it, to tie these pieces together. 
Modifyingexisting elements of the backend protocol is not presently in the cards. 

From my perspective this is clearly a bug as there is no way to define a function in a way that provides enough data to
thereader. 

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: Tom Lane
Date:
Subject: Re: RowDescription for a function does not include table OID