dbTalk Databases Forums  

about return status in OME

comp.databases.ingres comp.databases.ingres


Discuss about return status in OME in the comp.databases.ingres forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
zhenchen17
 
Posts: n/a

Default about return status in OME - 03-23-2009 , 06:50 AM






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??

Thanks
Chenzhen

Reply With Quote
  #2  
Old   
Roy Hann
 
Posts: n/a

Default Re: about return status in OME - 03-25-2009 , 03:38 AM






zhenchen17 wrote:

Quote:
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



Reply With Quote
  #3  
Old   
zhenchen17
 
Posts: n/a

Default Re: about return status in OME - 03-26-2009 , 04:37 AM



Hi Roy,

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...

Thank a lot for your suggestion.
Chenzhen

On 3月25日, 下午5时38分, Roy Hann <specia... (AT) processed (DOT) almost.meat> wrote:
Quote:
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


Reply With Quote
  #4  
Old   
Roy Hann
 
Posts: n/a

Default Re: about return status in OME - 03-26-2009 , 04:58 AM



zhenchen17 wrote:

Quote:
I apologize if I I offended you before.
I'm not offended, and I am slightly surprised you don't seem to be
either.

Quote:
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 to http://www.iua.org.uk/join to get on the mailing list.




Reply With Quote
  #5  
Old   
zhenchen17
 
Posts: n/a

Default Re: about return status in OME - 03-26-2009 , 06:32 AM



Hi Ray

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.
Chenzhen

On 3月26日, 下午6时58分, Roy Hann <specia... (AT) processed (DOT) almost.meat> wrote:
Quote:
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.


Reply With Quote
  #6  
Old   
Roy Hann
 
Posts: n/a

Default Re: about return status in OME - 03-26-2009 , 07:27 AM



zhenchen17 wrote:

Quote:
SQL/MM is short for SQL MultiMedia and is made by ISO/IEC JTC1 SC32
WG4.
Yes, I took the trouble to find that out once you told me where this was
coming from.

Quote:
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.
Any standard is better than no standard. But then again, all that
glisters is not gold.

Quote:
Thanks very much for your comments.
I think I will keep further comments to myself, or I am likely to
express some fairly forceful views on standards that try to lead
instead of follow.

--
Roy

UK Ingres User Association Conference 2009 will be on Tuesday June 9, 2009
Go to http://www.iua.org.uk/join to get on the mailing list.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.