Re: Maintain the pathkesy for subquery from outer side information

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Maintain the pathkesy for subquery from outer side information
Date: 2021-07-24 14:14:41
Message-ID: 1053515.1627136081@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> writes:
> When I am working on the UnqiueKey stuff, I find the following cases.
> SELECT * FROM (SELECT * FROM t offset 0) v ORDER BY a;
> // root->query_keys = A. root->order_pathkeys = A
> // Current: subroot->query_pathkeys = NIL.
> // Expected: subroot->xxxx_pathkeys = [A].

Why do you "expect" that? I think pushing the outer ORDER BY past a
LIMIT is an unacceptable semantics change.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andy Fan 2021-07-24 14:19:32 Re: Maintain the pathkesy for subquery from outer side information
Previous Message Bruce Momjian 2021-07-24 14:01:05 Re: visibility map corruption