On 20 November 2013 22:46, Andrew Gierth and...@tao11.riddles.org.uk wrote:
Tom == Tom Lane t...@sss.pgh.pa.us writes:
Tom 1. Reinsert HEAD's prohibition against directly combining WITH
Tom ORDINALITY with a coldeflist (with a better error message and a
Tom HINT suggesting that you can get
Dean Rasheed dean.a.rash...@gmail.com writes:
On 20 November 2013 22:46, Andrew Gierth and...@tao11.riddles.org.uk wrote:
Tom == Tom Lane t...@sss.pgh.pa.us writes:
Tom 1. Reinsert HEAD's prohibition against directly combining WITH
Tom ORDINALITY with a coldeflist (with a better error message
Consider the following case of a function that requires a column
definition list (example borrowed from the regression tests):
create function array_to_set(anyarray) returns setof record as $$
select i AS index, $1[i] AS value from generate_subscripts($1, 1) i
$$ language sql strict immutable;
Tom Lane-2 wrote
It seems to me that we don't really want this behavior of the coldeflist
not including the ordinality column. It's operating as designed, maybe,
but it's unexpected and confusing. We could either
1. Reinsert HEAD's prohibition against directly combining WITH ORDINALITY
David Johnston pol...@yahoo.com writes:
Tom Lane-2 wrote
It seems to me that we don't really want this behavior of the coldeflist
not including the ordinality column. It's operating as designed, maybe,
but it's unexpected and confusing. We could either
1. Reinsert HEAD's prohibition
Tom Lane-2 wrote
David Johnston lt;
polobo@
gt; writes:
Tom Lane-2 wrote
It seems to me that we don't really want this behavior of the coldeflist
not including the ordinality column. It's operating as designed, maybe,
but it's unexpected and confusing. We could either
1. Reinsert
David Johnston pol...@yahoo.com writes:
Just to clarify we are still allowing simple aliasing:
select * from generate_series(1,2) with ordinality as t(f1,f2);
Right, that works (and is required by spec, I believe). It's what to
do with our column-definition-list extension that's at issue.
Tom Lane-2 wrote
David Johnston lt;
polobo@
gt; writes:
Just to clarify we are still allowing simple aliasing:
select * from generate_series(1,2) with ordinality as t(f1,f2);
Right, that works (and is required by spec, I believe). It's what to
do with our column-definition-list
Tom == Tom Lane t...@sss.pgh.pa.us writes:
Tom 1. Reinsert HEAD's prohibition against directly combining WITH
Tom ORDINALITY with a coldeflist (with a better error message and a
Tom HINT suggesting that you can get what you want via the TABLE
Tom syntax).
That gets my vote.
--
Andrew