Re: Anonymous code block with parameters

From: Marko Tiikkaja <marko(at)joh(dot)to>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>, Hannu Krosing <hannu(at)2ndquadrant(dot)com>
Cc: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Kalyanov Dmitry <kalyanov(dot)dmitry(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Anonymous code block with parameters
Date: 2014-09-19 18:52:34
Message-ID: 541C7B72.7040508@joh.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2014-09-19 8:20 PM, Merlin Moncure wrote:
> actually, this trick *only* works during json serialization -- it
> allows control over the column names that row() masks over. trying to
> expand (tup).* still gives the dreaded "ERROR: record type has not
> been registered". That's because this works:
>
> select (q).* from (select 1 as a, 2 as b) q;
>
> but this doesn't:
>
> select ((select q from (select a,b) q)).* from (select 1 as a, 2 as b) q;

Yeah. This is a seriously missing feature and a PITA. :-(

.marko

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2014-09-19 20:16:35 Re: Turning off HOT/Cleanup sometimes
Previous Message Josh Berkus 2014-09-19 18:40:17 Re: Yet another abort-early plan disaster on 9.3