BUG #17360: array_to_string should be immutable instead of stable - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17360: array_to_string should be immutable instead of stable
Date
Msg-id 17360-a50d754b72a97cad@postgresql.org
Whole thread Raw
Responses Re: BUG #17360: array_to_string should be immutable instead of stable
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17360
Logged by:          Gergely Czuczy
Email address:      gergely.czuczy@harmless.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


pgsql-bugs by date:

Previous
From: Semab Tariq
Date:
Subject: Re: postgresql bug
Next
From: Tom Lane
Date:
Subject: Re: BUG #17360: array_to_string should be immutable instead of stable