BUG #15462: WITH ORDINALITY and CTEs don't work

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: michael(dot)meyer(at)pace(dot)de
Subject: BUG #15462: WITH ORDINALITY and CTEs don't work
Date: 2018-10-26 10:55:57
Message-ID: 15462-e08751fe7af734ac@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 15462
Logged by: Michael Meyer
Email address: michael(dot)meyer(at)pace(dot)de
PostgreSQL version: 11.0
Operating system: Windows 10
Description:

CTEs don't play nicely together with 'WITH ORDINALITY':

This is working:

SELECT * FROM generate_series(4,1,-1) WITH ORDINALITY;
WITH a AS (SELECT * FROM generate_series(4,1,-1) )
SELECT * FROM a;

whereas this yields syntax error (42601)

WITH a AS (SELECT * FROM generate_series(4,1,-1) )
SELECT * FROM a WITH ORDINALITY;

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message hubert depesz lubaczewski 2018-10-26 11:34:26 Re: BUG #15462: WITH ORDINALITY and CTEs don't work
Previous Message Tom Lane 2018-10-26 10:13:00 Re: BUG #15461: Postgresql fuzzy match extension giving out error