> > 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 :-(

Ah, thanks Tom.

No, I think I'll go for the current implementation instead ;)

But in a UNION ALL the distinctiveness isn't an issue, is it?

So why is this failing as well:
        select 1 union select * from (select null union all select null) as foo;

I strolled through chapters 8 and 10 of the docs ('data types' and 'type 
conversion') earlier, is there some additional source of information that 
describes the way PostgreSQL handles typing, specifically things like what 
you're describing here? Other than the source that is... 





-- 
Best,




Frank.


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to