pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: michael.meyer@pace.de
Subject: BUG #15462: WITH ORDINALITY and CTEs don't work
Date: Fri, 26 Oct 2018 10:55:57 +0000
Message-ID: <15462-e08751fe7af734ac@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      15462
Logged by:          Michael Meyer
Email address:      michael.meyer@pace.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;



view thread (2+ messages)  latest in thread

Message-ID: <15462-e08751fe7af734ac@postgresql.org>
Permalink:  ../15462-e08751fe7af734ac@postgresql.org/
Also on:    postgresql.org/message-id/15462-e08751fe7af734ac@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: noreply@postgresql.org, michael.meyer@pace.de
  Subject: Re: BUG #15462: WITH ORDINALITY and CTEs don't work
  In-Reply-To: <15462-e08751fe7af734ac@postgresql.org>
  References: <15462-e08751fe7af734ac@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox