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 20:28:15
Message-ID: 29723.1306873695@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:
> There have been multiple complaints about this in the archives. In
> the old days, you would have to rewrite your query to use the 'select
> * from func()' form (which isn't always so easy) or use a subquery and
> the 'offset 0' hack. Running in to this problem has actually become
> more common as our type system has gotten fancier and plpgsql got the
> ability to be called with the column list, aka select func(), syntax.

> The community has had to endure multiple sanctimonious rants about
> this by yours truly. Unfortunately complaints are cheap relative to
> the hard work and consensus building it would require to fix this
> problem.

FWIW, the SQL-standard LATERAL construct would fix the problem
reasonably well, and that is on the roadmap already.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Håvard Wahl Kongsgård 2011-05-31 20:42:10 UTF-8 and Regular expression
Previous Message Adrian Klaver 2011-05-31 19:59:53 Re: Some clarification about TIMESTAMP