Re: Is a function to a 1-component record type undeclarable?

From: Chapman Flack <chap(at)anastigmatix(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is a function to a 1-component record type undeclarable?
Date: 2021-11-22 16:37:53
Message-ID: 619BC761.8070207@anastigmatix.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/22/21 11:15, Tom Lane wrote:
> Yup, that's intentional, and documented.

I think I found where it's documented; nothing under argmode/column_type
/column_name, but just enough under rettype to entail the current behavior.

> It seems more useful to allow you to declare a scalar-returning function
> in this style, if you wish, than to make it mean a one-component record.

Would that usefulness be diminished any by allowing the currently-rejected
explicit RECORD syntax to be accepted and explicitly mean record?

Regards,
-Chap

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-11-22 16:50:00 Re: add missing errdetail for xlogreader allocation failure error
Previous Message Alvaro Herrera 2021-11-22 16:25:45 Re: Isn't it better with "autovacuum worker...." instead of "worker took too long to start; canceled" specific to "auto