Re: Improve handling of pg_stat_statements handling of bind "IN" variables - Mailing list pgsql-hackers

From Pavel Trukhanov
Subject Re: Improve handling of pg_stat_statements handling of bind "IN" variables
Date
Msg-id CAF42k=LvVrFoONCwr1jWGcZfsAbnpWjz6xk0HVGyPACLk2HYVQ@mail.gmail.com
Whole thread Raw
In response to Re: Improve handling of pg_stat_statements handling of bind "IN" variables  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Improve handling of pg_stat_statements handling of bind "IN" variables  (Greg Stark <stark@mit.edu>)
List 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 by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Next
From: Bruce Momjian
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)