OSDN Git Service

When you do "ARRAY[...]::domain", where domain is a domain over an array type,
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 13 Nov 2009 16:09:10 +0000 (16:09 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Fri, 13 Nov 2009 16:09:10 +0000 (16:09 +0000)
commit942702a496c3c45f5f8205ebd59a2827678bed25
treeee0031ca37b67714ded2028908f429663a6bb4a9
parent5e75f6790c6abc3bb5954ea380fb92e40f867d5e
When you do "ARRAY[...]::domain", where domain is a domain over an array type,
we need to check domain constraints. We used to do it correctly, but 8.4
introduced a separate code path for the "ARRAY[]::arraytype" case to infer
the type of an empty ARRAY construct from the cast target, and forgot to take
domains into account.

Per report from Florian G. Pflug.
src/backend/parser/parse_expr.c