Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group