Re: BUG #5974: UNION construct type cast gives poor error message
От | Kevin Grittner |
---|---|
Тема | Re: BUG #5974: UNION construct type cast gives poor error message |
Дата | |
Msg-id | 4DA5E1B8020000250003C7DC@gw.wicourts.gov обсуждение исходный текст |
Ответ на | Re: BUG #5974: UNION construct type cast gives poor error message (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #5974: UNION construct type cast gives poor error message
|
Список | pgsql-bugs |
Tom Lane <tgl@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
В списке pgsql-bugs по дате отправления: