![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi everyone, In my OME case, I would deal with the OME datatype. But if errors found, I don't want to interrupt the operation immediately. Instead, i want to complete the successive operations and turning NULL if error and values if sucessful. For much more detail, suppose that there are 3 records in Table T: R-A R-B R-C in which R-B is illegal to function F. When the function is called, I hope to get this result: V-A (V-A is the value of F(R-A)) NULL V-C and a message shows that R-B is illegal to function F. If I return II_ERROR when R-B is handled, the R-C will never be fetched and the operation will stop. But if i return II_WARN, there is something wired happening. Whatever the V-C is(I return II_OK status), the return value always is NULL. And if R-C is before R-B, the correct value is returned: V-A V-C NULL and error message. II_INFO seems not work neither. So any idea on the return status to achive what i want to?? |
#3
| |||
| |||
|
|
zhenchen17 wrote: Hi everyone, In my OME case, I would deal with the OME datatype. But if errors found, I don't want to interrupt the operation immediately. Instead, i want to complete the successive operations and turning NULL if error and values if sucessful. For much more detail, suppose that there are 3 records in Table T: R-A R-B R-C in which R-B is illegal to function F. When the function is called, I hope to get this result: V-A (V-A is the value of F(R-A)) NULL V-C and a message shows that R-B is illegal to function F. If I return II_ERROR when R-B is handled, the R-C will never be fetched and the operation will stop. But if i return II_WARN, there is something wired happening. Whatever the V-C is(I return II_OK status), the return value always is NULL. And if R-C is before R-B, the correct value is returned: V-A V-C NULL and error message. II_INFO seems not work neither. So any idea on the return status to achive what i want to?? I think you really ought to be discouraged from this approach. This is counter-relational. What you are describing always sounds good to a procedural programmer but it is wrong-headed. The correct solution is the simple solution; just error out. Don't mask or tolerate data-quality problems. Functions that soft-fail with warnings are OK as workarounds, when a botched feature has been widely implemented and has become pervasive. Setting out to design it this way is flat-out wrong. Based on this and a previous post I suspect you know an enormous amount about programming but you are going off in the wrong direction because you don't know or don't respect the relational model. Frankly the world if full of crap DBMSs designed by people like that and we don't need more. Sorry about the flame, but my previous gentle hint didn't get noticed. -- Roy |
#4
| |||
| |||
|
|
I apologize if I I offended you before. |
|
In fact, I prefer just returning error to warning. It makes more easy to deal with my UDTs. Unfortunately, this crap rule is made by SQL/MM part3 -- spatial(P574): "W" means that the class value given corresponds to a successful completion but with a warning and is a completion condition; That means the status should be both OK and returning some message. I am afraid Ingres have no respoding mechanism so I tried to find a way to solve this... |
#5
| |||
| |||
|
|
zhenchen17 wrote: I apologize if I I offended you before. I'm not offended, and I am slightly surprised you don't seem to be either. In fact, I prefer just returning error to warning. It makes more easy to deal with my UDTs. Unfortunately, this crap rule is made by SQL/MM part3 -- spatial(P574): "W" means that the class value given corresponds to a successful completion but with a warning and is a completion condition; That means the status should be both OK and returning some message. I am afraid Ingres have no respoding mechanism so I tried to find a way to solve this... That explains everything. My views on SQL are pretty well-known and nothing about SQL/MM does much to improve them. I apologize for assuming you are personally responsible for this foolishness. I hope it ends well for all concerned. -- Roy UK Ingres User Association Conference 2009 will be on Tuesday June 9, 2009 Go tohttp://www.iua.org.uk/jointo get on the mailing list. |
#6
| |||
| |||
|
|
SQL/MM is short for SQL MultiMedia and is made by ISO/IEC JTC1 SC32 WG4. |
|
SQL/MM part3 spatial and OGC(Open Geographic Consortium) Simple Feature are the two bibles of spatial database. All UDTs and Functions are defined in these specifications. |
|
Thanks very much for your comments. |
![]() |
| Thread Tools | |
| Display Modes | |
| |