Shouldn't construct_array_builtin and deconstruct_array_builtin agree on types?

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Subject: Shouldn't construct_array_builtin and deconstruct_array_builtin agree on types?
Date: 2023-06-12 20:38:59
Message-ID: bf166909-8a8d-2d5f-ed5e-4a4d5121bde7@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I noticed that these two function, introduced in d746021de18b, disagree
on what types they support. For construct_array_builtin, we support
these types:

- CHAROID:
- CSTRINGOID:
- FLOAT4OID:
- INT2OID:
- INT4OID:
- INT8OID:
- NAMEOID:
- OIDOID:
- REGTYPEOID:
- TEXTOID:
- TIDOID:

while deconstruct_array_builtin supports just a subset:

- CHAROID:
- CSTRINGOID:
- FLOAT8OID:
- INT2OID:
- OIDOID:
- TEXTOID:
- TIDOID:

I ran into this for INT4OID. Sure, I can just lookup the stuff and use
the regualr deconstruct_array, but the asymmetry seems a bit strange. Is
that intentional?

regards

--
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-06-12 21:04:04 Re: Order changes in PG16 since ICU introduction
Previous Message Joel Jacobson 2023-06-12 20:36:01 Re: Do we want a hashset type?