Why is cast array integer[] <--> text[] is not immutable.

From: Phil Couling <couling(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Why is cast array integer[] <--> text[] is not immutable.
Date: 2011-12-09 11:42:01
Message-ID: CANWftz+7uGNBjO=FznkVvqsXObX4Y=otnBXRxM4z2ozuKrWN2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Simon Riggs 2011-12-09 13:03:08 Re: Hope for a new PostgreSQL era?
Previous Message Simon Riggs 2011-12-09 10:51:01 Re: Hope for a new PostgreSQL era?