BUG #17360: array_to_string should be immutable instead of stable

From: PG Bug reporting form <noreply(at)postgresql(dot)org>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Cc: gergely(dot)czuczy(at)harmless(dot)hu
Subject: BUG #17360: array_to_string should be immutable instead of stable
Date: 2022-01-10 10:47:26
Message-ID: 17360-a50d754b72a97cad@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 17360
Logged by: Gergely Czuczy
Email address: gergely(dot)czuczy(at)harmless(dot)hu
PostgreSQL version: 13.3
Operating system: FreeBSD13
Description:

Hello,

The array_to_string function should have a volatility of immutable, it
perfectly fits the requirements in the documentation.

Where this comes to play is generated columns, when one wishes to have a
field something like GENERATED ALWAYS AS (array_to_string(ARRAY[selector,
'_domainkey', subdomain], '.')) STORED.

Reading the documentation I haven't found anything that would prevent the
function from being immutable, and enable this kind of usecases.

Best regards,
Gergely

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-01-10 14:54:23 Re: BUG #17360: array_to_string should be immutable instead of stable
Previous Message Semab Tariq 2022-01-10 05:43:38 Re: postgresql bug