Re: Appetite for syntactic sugar to match result set columns to UDT fields? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Appetite for syntactic sugar to match result set columns to UDT fields?
Date
Msg-id 1308528.1757051696@sss.pgh.pa.us
Whole thread Raw
In response to Appetite for syntactic sugar to match result set columns to UDT fields?  (Philip Warner <pjw@rhyme.com.au>)
Responses Re: Appetite for syntactic sugar to match result set columns to UDT fields?
List pgsql-hackers
Philip Warner <pjw@rhyme.com.au> writes:
> The Problem 
> Currently, if one has: 
> Create Type FOO(
>    VALUE1 Int,
>    VALUE2 Int); 
> And one has a query: 
>     Select F1, F2 from A_TABLE; 
> One can return the rows, or one can create a row object and cast it to
> FOO type. 

I'm kind of wondering where is the connection between type FOO and
table A_TABLE?

Once you have the table, there is already a perfectly good composite
type A_TABLE that you could use without any worries about whether it
matches the table.  So I'm not following why introducing FOO adds
anything of value.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alyona Vinter
Date:
Subject: Re: Resetting recovery target parameters in pg_createsubscriber
Next
From: shveta malik
Date:
Subject: Re: Conflict detection for update_deleted in logical replication