From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | 253540651(at)qq(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17151: A SEGV in optimizer |
Date: | 2021-08-19 01:02:44 |
Message-ID: | CAD21AoC85wAip6EEitcNJbwUF+RCkW2H+veFmNbmJJRhaSx71w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Thu, Aug 19, 2021 at 8:24 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> I wrote:
> > (This passes check-world, but I've not double-checked to make sure
> > that inFromCl will be set in exactly the cases we want.)
>
> After studying the code a bit more, I remembered why my hindbrain
> was feeling uncomfortable about that coding: parsenodes.h says that
> inFromCl is quasi-deprecated and not used anymore during parsing.
>
> However, we can't really use the ParseNamespaceItem data structure
> for this purpose, because baserels should be available to lock
> whether or not they are visible according to join aliasing rules.
> I don't see a lot of point to inventing some complicated add-on
> for this when inFromCl will serve fine. So I think we should just
> adjust the relevant comments, say like the attached.
The patch looks good to me. I've also confirmed that it passed
check-world and fixed the problem.
> We probably need some regression test cases added (I wonder whether
> FOR UPDATE in rule actions is covered at all ATM). Otherwise
> I feel like this is OK to commit.
+1 for adding at least two queries reported on this thread to regression tests.
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Julien Rouhaud | 2021-08-19 02:45:50 | Re: BUG #17148: About --no-strict-names option and --quiet option of pg_amcheck command |
Previous Message | Tom Lane | 2021-08-18 23:24:20 | Re: BUG #17151: A SEGV in optimizer |