Re: Improve handling of pg_stat_statements handling of bind "IN" variables

Поиск
Список
Период
Сортировка
От Pavel Trukhanov
Тема Re: Improve handling of pg_stat_statements handling of bind "IN" variables
Дата
Msg-id CAF42k=LvVrFoONCwr1jWGcZfsAbnpWjz6xk0HVGyPACLk2HYVQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improve handling of pg_stat_statements handling of bind "IN" variables  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Improve handling of pg_stat_statements handling of bind "IN" variables  (Greg Stark <stark@mit.edu>)
Список pgsql-hackers
Thanks for the feedback.

I thought once again about separating IN from ARRAY, with refactoring
etc as Tom suggested, and now I don't think it's worth it to do so.
I've tried to implement that, and besides that it will require to
change things in every part of query processing pipeline, it seems
that most of the times I will have to repeat (copy/paste) for IN case
all the code that now works in for ARRAY. At first I though there will
be simplifications, that will justify such refactoring - i.e. I
thought I could at least drop "multidims" bool that tells ARRAY[] from
ARRAY[ARRAY[]]. But it turns out it's not the case – one can write
something like "x IN (ARRAY[1], ARRAY[1,2])" that will result in
multidim IN-list array.

So I don't think there's actually enough benefit to split those two apart.

Now I want to do this: just add a meta info (basically a bool field)
to the ArrayExpr struct, so on later stages we could tell if that's an
ArrayExpr of an ARRAY or of an IN list. Plus to add ignoring updating
Jumble for expression subtree within IN-list array.

If that approach doesn't seem too bad to anyone, I would like to go
forward and submit a patch – it seems pretty straightforward to
implement that.

Thoughts?

Thank you.
 ---
Pasha Trukhanov



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)