Re: [HACKERS] A small problem with the new inet and cidr types
От | darcy@druid.net (D'Arcy J.M. Cain) |
---|---|
Тема | Re: [HACKERS] A small problem with the new inet and cidr types |
Дата | |
Msg-id | m0zaKDM-0000eRC@druid.net обсуждение исходный текст |
Ответ на | Re: [HACKERS] A small problem with the new inet and cidr types (Bruce Momjian <maillist@candle.pha.pa.us>) |
Список | pgsql-hackers |
Thus spake Bruce Momjian > > At Marc's request I am holding my patch until 6.4 is frozen. > > Huh. You have a backend crash fix, and we can't apply it until after > 6.4 is out the door? Well, it wasn't complete anyway since I wasn't sure what to do about the operators. However, I have since figured it out, I think. I think that if either argument to an operator function is NULL then the function should return FALSE. My reasoning is that it should be consistent and people should be able to decide the sense of the test for the results they expect. Every test can be expressed as the negation of another test so the user can decide whether they want nulls to be included or not. For example; SELECT c < i FROM inet_tbl; SELECT NOT (c >= i) FROM inet_tbl; While both of the above selects are nominally equivalent, in the first case rows where i1 or i2 is null will return 0 while in the second case they return 1. Does this seem right? Now, after making the above changes to my local copy I tested it and I found that when one of the fields was null, the bool result is blank, not t or f. I'm sure it goes to the functions as it crashes without the changes so I'm not sure why it is blank after. One more thing, I'm not sure how this gets fixed but the function results are still right justified. Weren't we going to left justify them? -- D'Arcy J.M. Cain <darcy@{druid|vex}.net> | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.
В списке pgsql-hackers по дате отправления: