Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
От | Tom Lane |
---|---|
Тема | Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling) |
Дата | |
Msg-id | 9209.1473702485@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling) (Andres Freund <andres@anarazel.de>) |
Ответы |
Re: Implement targetlist SRFs using ROWS FROM() (was
Changed SRF in targetlist handling)
|
Список | pgsql-hackers |
Andres Freund <andres@anarazel.de> writes: > On 2016-09-12 13:26:20 -0400, Tom Lane wrote: >> Andres Freund <andres@anarazel.de> writes: > On 2016-09-12 12:10:01 -0400, Tom Lane wrote: >>>> I can't say that I like the proposed syntax much. >>> Me neither. But I haven't really found a better approach. It seems >>> kinda consistent to have ROWS FROM (... AS ()) change the picked out >>> columns to 0, and just return the whole thing. >> I just remembered that we allow zero-column composite types, which >> makes this proposal formally ambiguous. So we really need a different >> syntax. I'm not especially in love with the cast-to-record idea, but >> it does dodge that problem. > I kind of like ROWS FROM (... AS VALUE), that seems to confer the > meaning quite well. As VALUE isn't a reserved keyword, that'd afaik only > really work inside ROWS FROM() where AS is required. Hm, wouldn't ... AS RECORD convey the meaning better? (Although once you look at it that way, it's just a cast spelled in an idiosyncratic fashion.) regards, tom lane
В списке pgsql-hackers по дате отправления: