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

2011-05-11 Thread Noah Misch
On Wed, May 11, 2011 at 10:22:01AM -0400, Tom Lane wrote: > Noah Misch writes: > > On Mon, May 09, 2011 at 11:32:28PM -0400, Tom Lane wrote: > >> So we basically had three alternatives to make it better: > >>* downcast to the array type, which would possibly silently > >> break applicatio

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

2011-05-11 Thread Tom Lane
Noah Misch writes: > On Mon, May 09, 2011 at 11:32:28PM -0400, 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 cons

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

2011-05-11 Thread Noah Misch
On Mon, May 09, 2011 at 11:32:28PM -0400, Tom Lane wrote: > To be concrete, consider the function array_append(anyarray, anyelement) > yielding anyarray. Suppose we have a domain D over int[] and the call > array_append(var_of_type_D, 42). If we automatically downcast the > variable to int[], sho