Appetite for syntactic sugar to match result set columns to UDT fields?

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Appetite for syntactic sugar to match result set columns to UDT fields?
Дата
Msg-id CAKFQuwaNf4Zc3XV0Zy_MUA2AobJ2+=K8_+iLUY31fuQXgwcbag@mail.gmail.com
обсуждение исходный текст
Ответ на Appetite for syntactic sugar to match result set columns to UDT fields?  (Philip Warner <pjw@rhyme.com.au>)
Список pgsql-hackers
On Thursday, September 4, 2025, Philip Warner <pjw@rhyme.com.au> wrote:

The Solution

Some syntax like:

    SELECT CAST((F1=> value1, F2 => value2) AS FOO BY NAME)

or

    SELECT FOO(F1 => VALUE1, F2=> value2);

or some other well-defined and non-conflicting syntax.


Don’t really see the point of new syntax here - both things you wrote are already effectively syntactically valid if a user-defined function exists; and it’s a cleaner interface.  Plus, the serialized form of a composite doesn’t include field names so giving those names special treatment elsewhere feels excessive.

Expanding cast with custom features seems particularly undesirable.

David J.

В списке pgsql-hackers по дате отправления: