Re: BUG #2905: min and max return incorrect text type
От | Adriaan van Os |
---|---|
Тема | Re: BUG #2905: min and max return incorrect text type |
Дата | |
Msg-id | 45B36DCD.8030409@microbizz.nl обсуждение исходный текст |
Ответ на | Re: BUG #2905: min and max return incorrect text type (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-bugs |
Peter Eisentraut wrote: > Adriaan van Os wrote: >>>> However, min(VARCHAROID) and max(VARCHAROID) return TEXTOID as a >>>> result type. >>> Yea, they are internally treated as very similar types. >> But "internally treated as very similar" is still not "same as >> argument type". Computing requires exactness. > > Aside from the apparent discrepancy between the documentation and the > actual behavior, is there an actual use case where this is a problem? Dijkstra's "Rule 0: Dont Make a Mess of It <http://www.cs.utexas.edu/users/EWD/> and the virtues of strong typing, which, for SQL, imply checks at runtime <http://en.wikipedia.org/wiki/Type_safety>. Besides, the question is absurd. I stumble over a stone on the road, report it and then you ask "is there an actual use case where this is a problem". Why else do I report it ? What you probably wanted to ask is: "Apart from the missing warning along the road, couldn't you have walked around that stone ?" Well, in answer to that last question, I could have, but that is the wrong approach to computing. Regards, Adriaan van Os
В списке pgsql-bugs по дате отправления: