Missing deconstruct_array_builtin usage

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Missing deconstruct_array_builtin usage
Date: 2024-10-11 05:37:07
Message-ID: Zwi5g2GzlUX1NqxR@ip-10-97-1-34.eu-west-3.compute.internal
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

While working on [1], I noticed that we missed using deconstruct_array_builtin()
in 062a8444242.

Indeed, d746021de1 added construct_array_builtin and deconstruct_array_builtin
but , later on, 062a8444242 made use of deconstruct_array for TEXTOID.

Please find attached a tiny patch to add the $SUBJECT.

That does not fix any issues, it just removes this unnecessary hardcoded
parameters related to TEXTOID passed to deconstruct_array.

A quick check:

$ git grep construct_array | grep OID | grep -v builtin
src/backend/catalog/pg_publication.c: deconstruct_array(arr, TEXTOID, -1, false, TYPALIGN_INT,
src/backend/utils/fmgr/funcapi.c: * For the OID and char arrays, we don't need to use deconstruct_array()

shows that this is the "only" miss since d746021de1, so I still don't think it
has to be more "complicated" than it is currently (as already mentioned by Peter
in [2]).

[1]: https://www.postgresql.org/message-id/ZwdK1UYdLn/zFMHy%40ip-10-97-1-34.eu-west-3.compute.internal
[2]: https://www.postgresql.org/message-id/2914356f-9e5f-8c59-2995-5997fc48bcba%40enterprisedb.com

Looking forward to your feedback,

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v1-0001-Missing-deconstruct_array_builtin-usage.patch text/x-diff 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiro.Ikeda 2024-10-11 05:44:39 RE: Improve EXPLAIN output for multicolumn B-Tree Index
Previous Message Steve Lau 2024-10-11 05:33:54 Doc of typmod arg perhaps deserves an update