Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase)
От | Rick Morris |
---|---|
Тема | Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase) |
Дата | |
Msg-id | 4357A8B2.3050202@brainscraps.com обсуждение исходный текст |
Ответ на | Re: 'a' == 'a ' (Was: RE: [pgsql-advocacy] [GENERAL] Oracle buysInnobase) (Richard Huxton <dev@archonet.com>) |
Список | pgsql-hackers |
Richard Huxton wrote: > Dann Corbit wrote: > >> >> I can see plenty of harm and absolutely no return. We are talking about >> blank padding before comparison. Do you really want 'Danniel ' >> considered distinct from 'Danniel ' in a comparison? In real life, >> what does that buy you? > > > 100% YES! > > If two values are the same, then any function on those two values should > return the same result. Otherwise what does "equals" mean? At the very > least length() is broken by your argument. I agree completely. I would much rather be precise than intuitive. And, I have done applications where the padding length was important, especially when working with remote batch processing in the credit industries and the like. Writing queries to create and process fixed-width batch files is much easier if you can rely on these kinds of behaviors. > > Here it's CHAR that's broken IMHO - spawn of some punch-card spawned > data processing rules of the 70s. > -- > Richard Huxton > Archonet Ltd > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster > >
В списке pgsql-hackers по дате отправления: