From: | Peter Geoghegan <pg(at)heroku(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Free indexed_tlist memory explicitly within set_plan_refs() |
Date: | 2015-07-24 18:55:30 |
Message-ID: | CAM3SWZSHNjJzA676LgvxKYV4mm0SmqbDZ4=Jh=bBK8JyBapHgg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jul 24, 2015 at 3:08 AM, Andres Freund <andres(at)anarazel(dot)de> wrote:
>> + 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?
No very strong reason. RelabelType exists to represent a dummy
coercion between two binary-compatible types. I think that a unique
index inference specification (which is novel in some ways) does not
need to do anything special for this case.
Each inference specification attribute that is an expression should
match some attribute in some index's cataloged definition. The
inference specification looks very much like the CREATE UNIQUE INDEX
that created the unique index that is inferred (usually, they'll be
identical). No need to make it any more complicated than that.
In fact, I don't think it's possible to construct a case where it
could even be argued that it matters. I'm not very caffeinated at the
moment, so I'm not sure of that.
--
Peter Geoghegan
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-07-24 19:02:31 | Re: RFC: replace pg_stat_activity.waiting with something more descriptive |
Previous Message | Andres Freund | 2015-07-24 18:55:20 | Re: Proposal for CSN based snapshots |