On Tue, 30 Jan 2007, Tom Lane wrote:
> "Sergiy Vyshnevetskiy" <serg(at)vostok(dot)net> writes:
>> Possible reason is forgotten SPI_push()/SPI_pop() wrapper in domain check
>> evaluation algorithm.
>
> I think it's really plpgsql's fault, not the domain code. Try this patch:
> http://archives.postgresql.org/pgsql-committers/2007-01/msg00405.php
Yeap, you nailed the insect.