Tom Lane <t...@sss.pgh.pa.us> wrote: > you wish that in > > (select '1' union select '2') union select 3 > > the fact that the third value is clearly integer would influence > the choice of the resolved type of the first UNION. Yeah. > My vision of how to implement that is different than what you seem > to have in mind, but it would come out with the same answer. OK > The sticking point is just that in purely syntactic terms this is > action-at-a-distance, and so it's hard to square with the spec. I > think that our current reading (in which the '1' and '2' get > resolved as text) is actually closer to what the spec says. Would the approach you have in mind accept a query which is valid under the spec yet return different results? If not, we can legitimately call it an extension. If we're not going to do that, there's probably some room to improve our error reporting and/or documentation around this issue. -Kevin
-- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs