Re: Check constraint on domain over an array not executed for array literals

From: "Florian G(dot) Pflug" <fgp(at)phlo(dot)org>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Postgresql-Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Check constraint on domain over an array not executed for array literals
Date: 2009-11-13 15:46:32
Message-ID: 4AFD7F58.3040406@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2009-11-13 15:46:42 Re: PL/Python array support
Previous Message Peter Eisentraut 2009-11-13 15:44:55 Re: Aggregate ORDER BY patch