Re: Check constraint on domain over an array not executed for array literals - Mailing list pgsql-hackers

From Florian G. Pflug
Subject Re: Check constraint on domain over an array not executed for array literals
Date
Msg-id 4AFD7F58.3040406@phlo.org
Whole thread Raw
In response to Re: Check constraint on domain over an array not executed for array literals  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: Check constraint on domain over an array not executed for array literals
List pgsql-hackers
Heikki Linnakangas wrote:
> Agreed, it's a bug. A simpler example is just: [snipped]

Will this fix for this be included in 8.4.2 (or .3), or will it have to
wait for 8.4 because it changes behavior?

> There's a special case in transformExpr function to handle the 
> "ARRAY[...]::arraytype" construct, which skips the usual type-casting
>  and just constructs an ArrayExpr with the right target type.
> However, it's not taking into account that the target type can be a
> domain.
> 
> Attached patch fixes that. Anyone see a problem with it?
I'm not familiar with the parser so I can't really judge this. However,
I've applied the patch to my development db and it seems to work fine,
and fixes the bug.

Thanks for the quick response!

best regards,
Florian Pflug

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Aggregate ORDER BY patch
Next
From: Teodor Sigaev
Date:
Subject: Re: PL/Python array support