Re: targetlist functions part 1 (was [HACKERS] targetlist

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Joe Conway <mail(at)joeconway(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: targetlist functions part 1 (was [HACKERS] targetlist
Date: 2003-01-21 21:32:07
Message-ID: Pine.LNX.4.44.0301211906530.789-100000@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane writes:

> > What concerns me is that we're inserting table-generating
> > syntax elements into the select list, which is where they've never
> > belonged.
>
> Do you see another way to pass non-constant arguments to the
> table-generating function?

SELECT * FROM table1 AS t1, table2 AS t2, func1(t1.col, t2.col) ... ?

That's a syntax that would make sense to me.

With sufficiently blurred vision one might even find SQL99's clause

<collection derived table> ::=
UNNEST <left paren> <collection value expression> <right paren>

<table primary> ::=
<table or query name> [ [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ] ]
| <derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <lateral derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <collection derived table> [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ]
| <only spec>
[ [ AS ] <correlation name>
[ <left paren> <derived column list> <right paren> ] ]
| <left paren> <joined table> <right paren>

applicable. Or maybe not.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-01-21 21:37:07 Re: targetlist functions part 1 (was [HACKERS] targetlist
Previous Message Jan Wieck 2003-01-21 20:59:01 Re: [mail] Re: Win32 port patches submitted

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-01-21 21:37:07 Re: targetlist functions part 1 (was [HACKERS] targetlist
Previous Message Jan Wieck 2003-01-20 22:04:12 Win32 port diff files