From: | Andy Fan <zhihui(dot)fan1213(at)gmail(dot)com> |
---|---|
To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, rushabh(dot)lathia(at)gmail(dot)com |
Subject: | Re: [PATCH] Keeps tracking the uniqueness with UniqueKey |
Date: | 2020-04-03 08:54:33 |
Message-ID: | CAKU4AWooBM4KpfsD-09C7rts5d+z6kMQ1kukhyM-d5LfrjiazA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Apr 3, 2020 at 12:08 PM David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> On Fri, 3 Apr 2020 at 16:40, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > (It occurs to me BTW that we've been overly conservative about using
> > NOT NULL constraints in planning, because of failing to consider that.
> > Addition or drop of NOT NULL has to cause a change in
> > pg_attribute.attnotnull, which will definitely cause a relcache inval
> > on its table, cf rules in CacheInvalidateHeapTuple(). So we *don't*
> > need to have a pg_constraint entry corresponding to the NOT NULL, as
> > we've mistakenly supposed in some past discussions.)
>
> Agreed for remove_useless_groupby_columns(), but we'd need it if we
> wanted to detect functional dependencies in
> check_functional_grouping() using unique indexes.
>
Thanks for the explanation. I will add the removal in the next version of
this
patch.
Best Regards
Andy Fan
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2020-04-03 09:02:09 | Re: snapshot too old issues, first around wraparound and then more. |
Previous Message | Daniel Verite | 2020-04-03 08:53:33 | Re: A bug when use get_bit() function for a long bytea string |