Re: Changed SRF in targetlist handling

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Changed SRF in targetlist handling
Date: 2016-05-23 18:30:13
Message-ID: CAKFQuwaEw2Xfr1z1kUtXuLDqMQSr-Qs1QQsseugwBHsTeYfhqQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 23, 2016 at 1:44 PM, David Fetter <david(at)fetter(dot)org> wrote:

> On Mon, May 23, 2016 at 01:36:57PM -0400, Tom Lane wrote:
> > David Fetter <david(at)fetter(dot)org> writes:
> > > On Mon, May 23, 2016 at 01:10:29PM -0400, Tom Lane wrote:
> > >> This seems a bridge too far to me. It's just way too common to do
> > >> "select generate_series(1,n)". We could tell people they have to
> > >> rewrite to "select * from generate_series(1,n)", but it would be far
> > >> more polite to do that for them.
> >
> > > How about making "TABLE generate_series(1,n)" work? It's even
> > > shorter in exchange for some cognitive load.
> >
> > No thanks --- the word after TABLE ought to be a table name, not some
> > arbitrary expression. That's way too much mess to save one keystroke.
>
> It's not just about saving a keystroke. This change would go with
> removing the ability to do SRFs in the target list of a SELECT
> query.
>

​If you want to make an argument for doing this regardless of the target
list SRF change by all means - but it does absolutely nothing to mitigate
the breakage that would result if we choose this path.

David J.​

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2016-05-23 19:02:41 Re: [BUGS] BUG #14153: Unrecognized node type error when upsert is present in recursive CTE
Previous Message Tom Lane 2016-05-23 18:29:57 Re: Calling json_* functions with JSONB data