Re: Function Column Expansion Causes Inserts To Fail

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Merlin Moncure <mmoncure(at)gmail(dot)com>
Cc: David Johnston <polobo(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Function Column Expansion Causes Inserts To Fail
Date: 2011-05-31 22:01:19
Message-ID: 2558.1306879279@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Merlin Moncure <mmoncure(at)gmail(dot)com> writes:
> I've never taken the time to really get my head around 'lateral'
> enough to say for sure if it provides clean workarounds for all the
> cases that get people into hot water. The case that used to get me a
> lot is (the unfortunately generally under utilized) custom aggregates.

> problem:
> select bar_id, (some_agg(foo)).* from foo join bar ... group by bar_id;

Hm, really? I'd expect that nodeAgg's attempts to collect identical
aggregate calls into one would keep you out of trouble there. That
hack unfortunately doesn't generalize to ordinary functions ...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2011-05-31 22:15:10 Re: Function Column Expansion Causes Inserts To Fail
Previous Message Merlin Moncure 2011-05-31 21:42:27 Re: Function Column Expansion Causes Inserts To Fail