Why is cast array integer[] <--> text[] is not immutable. - Mailing list pgsql-general

From Phil Couling
Subject Why is cast array integer[] <--> text[] is not immutable.
Date
Msg-id CANWftz+7uGNBjO=FznkVvqsXObX4Y=otnBXRxM4z2ozuKrWN2Q@mail.gmail.com
Whole thread Raw
Responses Re: Why is cast array integer[] <--> text[] is not immutable.
List pgsql-general
Hi

I'm struggling to understand why this casts is not immutable:

integer[]::text[]
text[]::integer[]

The following are all immutable:

integer::text
text::integer
integer[]::float[]
integer::float

I hit on this while trying to make a gin index which cast from one to the other.

Why does the encapsulation of an array suddenly make this not immutable?

Thanks

pgsql-general by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Hope for a new PostgreSQL era?
Next
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: Hope for a new PostgreSQL era?