BUG #17147: Why concat_ws and concat is not immutable?

Started by PG Bug reporting formover 4 years ago3 messagesbugs
Jump to latest
#1PG Bug reporting form
noreply@postgresql.org

The following bug has been logged on the website:

Bug reference: 17147
Logged by: RekGRpth
Email address: rekgrpth@gmail.com
PostgreSQL version: 13.4
Operating system: docker alpine
Description:

Why concat_ws and concat is not immutable? And why they cannot be used in
generated always as?

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: PG Bug reporting form (#1)
Re: BUG #17147: Why concat_ws and concat is not immutable?

PG Bug reporting form <noreply@postgresql.org> writes:

Why concat_ws and concat is not immutable?

Those invoke datatype-specific output functions, which aren't guaranteed
to be immutable. Maybe ideally they would be, but we have too much
historical baggage --- for example, timestamp_out has always depended
on DateStyle.

regards, tom lane

#3RekGRpth
rekgrpth@gmail.com
In reply to: Tom Lane (#2)
Re: BUG #17147: Why concat_ws and concat is not immutable?

Thank you for the clarification.

пн, 16 авг. 2021 г. в 19:22, Tom Lane <tgl@sss.pgh.pa.us>:

Show quoted text

PG Bug reporting form <noreply@postgresql.org> writes:

Why concat_ws and concat is not immutable?

Those invoke datatype-specific output functions, which aren't guaranteed
to be immutable. Maybe ideally they would be, but we have too much
historical baggage --- for example, timestamp_out has always depended
on DateStyle.

regards, tom lane