Frank van Vugt <[EMAIL PROTECTED]> writes: > # select 1 union select * from (select null union select null) as foo; > ERROR: UNION types integer and text cannot be matched
> I'm wondering about the reason this cast to text takes place, UNION requires assignment of a definite type to the inputs, because otherwise there's no certainty that we know how to identify distinct and non-distinct values. The alternative to assigning TEXT is to reject the inner UNION outright :-( regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly