From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Free indexed_tlist memory explicitly within set_plan_refs() |
Date: | 2015-07-24 10:08:39 |
Message-ID: | 20150724100839.GC5106@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2015-05-28 18:31:56 -0700, Peter Geoghegan wrote:
> Subject: [PATCH 3/3] Fix bug in unique index inference
>
> ON CONFLICT unique index inference had a thinko that could affect cases
> where the user-supplied inference clause required that an attribute
> match a particular (user named) collation and/or opclass.
>
> Firstly, infer_collation_opclass_match() matched on opclass and/or
> collation. Secondly, the attribute had to be in the list of attributes
> or expressions known to be in the definition of the index under
> consideration. The second step wasn't correct though, because having
> some match doesn't necessarily mean that the second step found the same
> index attribute as the (collation/opclass wise) match from the first
> step.
Yes, makes sense.
> + else
> + {
> + Node *nattExpr = list_nth(idxExprs, (natt - 1) - nplain);
> +
> + /*
> + * Note that unlike routines like match_index_to_operand(), we're
> + * unconcerned about RelabelType. An exact match is required.
> + */
> + if (equal(elem->expr, nattExpr))
> + return true;
Why is that?
Regads,
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Gierth | 2015-07-24 10:34:22 | Re: [HACKERS] GSets: Fix bug involving GROUPING and HAVING together |
Previous Message | Andres Freund | 2015-07-24 09:58:04 | Re: Free indexed_tlist memory explicitly within set_plan_refs() |