From: | Tender Wang <tndrwang(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Subject: | Re: BUG #18468: CREATE TABLE ... LIKE leaves orphaned column reference in extended statistics |
Date: | 2024-05-20 07:31:10 |
Message-ID: | CAHewXN=GgqYBULpWHOrAVU=3JkYEdh=2+VgWPBc8soe9iv8_YQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 于2024年5月18日周六 04:39写道:
> I wrote:
> > We don't know the column mapping there, either. What we need to have
> > our hands on is the "attmap" computed in expandTableLikeClause, and
> > then we can pass the stats expressions through map_variable_attnos().
>
> > I think this might not need to be a really large patch, but it
> > definitely has to change where generateClonedExtStatsStmt is
> > called from. I can have a go at it if Tomas doesn't want to.
>
> Yeah, this doesn't require a whole lot more than moving the
> processing in transformTableLikeClause to expandTableLikeClause.
>
> I chose to get rid of transformExtendedStatistics, because not
> only is there nothing for it to do, there will never be any
> statements for it to do nothing to.
>
The patch looks good to me.
--
Tender Wang
OpenPie: https://en.openpie.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Önder Kalacı | 2024-05-20 09:08:47 | Re: BUG #18467: postgres_fdw (deparser) ignores LimitOption |
Previous Message | torikoshia | 2024-05-20 07:02:21 | Re: Logical Replica ReorderBuffer Size Accounting Issues |