Re: Free indexed_tlist memory explicitly within set_plan_refs()

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Free indexed_tlist memory explicitly within set_plan_refs()
Дата
Msg-id CAM3SWZSHNjJzA676LgvxKYV4mm0SmqbDZ4=Jh=bBK8JyBapHgg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Free indexed_tlist memory explicitly within set_plan_refs()  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Jul 24, 2015 at 3:08 AM, Andres Freund <andres@anarazel.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Proposal for CSN based snapshots
Следующее
От: Robert Haas
Дата:
Сообщение: Re: RFC: replace pg_stat_activity.waiting with something more descriptive