Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-10 Thread Tom Lane
Robert Haas writes: > On Tue, May 10, 2011 at 1:52 PM, Tom Lane wrote: >> Robert Haas writes: >>> On Mon, May 9, 2011 at 11:32 PM, Tom Lane wrote: So we basically had three alternatives to make it better: * downcast to the array type, which would possibly silently

Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-10 Thread Robert Haas
On Tue, May 10, 2011 at 1:52 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, May 9, 2011 at 11:32 PM, Tom Lane wrote: >>> So we basically had three alternatives to make it better: >>>        * downcast to the array type, which would possibly silently >>>          break applications that wer

Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-10 Thread Tom Lane
Robert Haas writes: > On Mon, May 9, 2011 at 11:32 PM, Tom Lane wrote: >> So we basically had three alternatives to make it better: >>* downcast to the array type, which would possibly silently >> break applications that were relying on the function result >> being consi

Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-10 Thread Robert Haas
On Mon, May 9, 2011 at 11:32 PM, Tom Lane wrote: > "J. Greg Davidson" writes: >>       * Tighten casting checks for domains based on arrays (Tom Lane) > >>         When a domain is based on an array type,..., such a domain type >>         is no longer allowed to match an anyarray parameter of a >

Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-10 Thread J. Greg Davidson
Given: CREATE DOMAIN int_array AS int[]; The operator [] works fine in 4.1beta1: SELECT (ARRAY[1,2,3]::int_array)[1]; proving that int_array is an array type with element type int. It is inconsistent that other array functions and operators don't work. On Mon, 2011-05-09 at 23:32 -0400, T

Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-09 Thread Tom Lane
"J. Greg Davidson" writes: > * Tighten casting checks for domains based on arrays (Tom Lane) > When a domain is based on an array type,..., such a domain type > is no longer allowed to match an anyarray parameter of a > polymorphic function, except by explic

Re: [HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-09 Thread Merlin Moncure
On Mon, May 9, 2011 at 6:25 PM, J. Greg Davidson wrote: > > E.1.2.2. Casting > >      * Tighten casting checks for domains based on arrays (Tom Lane) > >        When a domain is based on an array type,..., such a domain type >        is no longer allowed to match an anyarray parameter of a >      

[HACKERS] 4.1beta1: ANYARRAY disallowed for DOMAIN types which happen to be arrays

2011-05-09 Thread J. Greg Davidson
E.1.2.2. Casting * Tighten casting checks for domains based on arrays (Tom Lane) When a domain is based on an array type,..., such a domain type is no longer allowed to match an anyarray parameter of a polymorphic function, except by explicitly down