Re: Shouldn't construct_array_builtin and deconstruct_array_builtin agree on types?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Shouldn't construct_array_builtin and deconstruct_array_builtin agree on types?
Date: 2023-06-12 23:23:06
Message-ID: ZIeo2pVq0VLXQ6uI@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 12, 2023 at 11:06:18PM +0200, Peter Eisentraut wrote:
> They only support the types that they were actually being used with. If you
> need another type, feel free to add it.

FWIW, I agree with Tomas that this is an oversight that should be
fixed in v16, saving from the need to have a copy of
deconstruct_array_builtin() in extensions. Same argument here:
couldn't it be possible that an extension does multiple array
constructs and deconstructs in a single code path? We have patterns
like that in core as well. For instance, see
extension_config_remove().
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2023-06-12 23:24:18 Re: Atomic ops for unlogged LSN
Previous Message Nathan Bossart 2023-06-12 23:12:22 Re: Setting restrictedtoken in pg_regress