Re: Check constraint on domain over an array not executed for array literals
Florian G. Pflug <fgp@phlo.org>
From: "Florian G. Pflug" <fgp@phlo.org>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Postgresql-Hackers <pgsql-hackers@postgresql.org>
Date: 2009-11-13T15:46:32Z
Lists: 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