Re: Anonymous code block with parameters - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: Anonymous code block with parameters
Date
Msg-id 541B593B.6010500@krosing.net
Whole thread Raw
In response to Re: Anonymous code block with parameters  (Marko Tiikkaja <marko@joh.to>)
Responses Re: Anonymous code block with parameters
List pgsql-hackers
On 09/18/2014 10:40 PM, Marko Tiikkaja wrote:
> On 2014-09-18 10:29 PM, Vik Fearing wrote:
>> On 09/18/2014 10:16 PM, Hannu Krosing wrote:
>>> I guess it proves (a little) that WITH is the right place to do these
>>> kind of things ...
>>
>> I've been wanting this syntax for a few years now, so I certainly vote
>> for it.
>
> I've also been wanting do to something like:
>
>   WITH mytyp AS (a int, b int, c int)
>   SELECT (tup).* FROM
>   (
>     SELECT CASE WHEN .. THEN ROW(1,2,3)::mytyp
>             WHEN .. THEN ROW(2,3,4)
>             ELSE ROW (3,4,5) END AS tup
>     FROM ..
>   ) ss
+1
>
>
> .marko
>
>




pgsql-hackers by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [GENERAL] [SQL] pg_multixact issues
Next
From: Hannu Krosing
Date:
Subject: Re: Anonymous code block with parameters