Re: PostgreSQL 12 Beta 1 press release draft

From: David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL 12 Beta 1 press release draft
Date: 2019-05-23 05:45:23
Message-ID: CAKJS1f-a1zNs8k6A=TysB9c1ksGWz_w0Hw7YGdw8nG3uHCiQkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 23 May 2019 at 15:31, Jonathan S. Katz <jkatz(at)postgresql(dot)org> wrote:
> Attached is
> v3 of the patch, along with a diff.

Minor details, but this query is not valid:

> WITH c AS MATERIALIZED (
> SELECT * FROM a WHERE a.x % 4
> )
> SELECT * FROM c JOIN d ON d.y = a.x;

a.x % 4 is not a boolean clause, and "a" is not in the main query, so
a.x can't be referenced there.

How about:

WITH c AS MATERIALIZED (
SELECT * FROM a WHERE a.x % 4 = 0
)
SELECT * FROM c JOIN d ON d.y = c.x;

--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-05-23 06:42:48 Re: [HACKERS] Unlogged tables cleanup
Previous Message Michael Paquier 2019-05-23 05:21:08 Re: nitpick about poor style in MergeAttributes