Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Info-Ingres] UDTs and standard operators

26 views
Skip to first unread message

Martin Bowes

unread,
Nov 13, 2012, 11:01:17 AM11/13/12
to info-...@kettleriverconsulting.com

Hi All,

 

When I define a UDT how should I specify a function to call when ‘+’ is used between two elements of this type?

 

How do I disallow the ‘-‘ or other operators?

 

Martin Bowes

Ingres Forums

unread,
Nov 13, 2012, 1:07:55 PM11/13/12
to

In the IIADD_FI_DFN for the UDT the fid_opid field must be II_ADD_OP,
fid_optype must be II_OPERATOR, fid_routine is your function that
performs the addition.
Have a look at "usop_add" used in op.c (in
$II_SYSTEM/ingres/demo/udadts)


--
Bodo
------------------------------------------------------------------------
Bodo's Profile: http://community.actian.com/forum/member.php?userid=16
View this thread: http://community.actian.com/forum/showthread.php?t=14859

Martin Bowes

unread,
Nov 14, 2012, 6:38:42 AM11/14/12
to Ingres and related product discussion forum
Of course!

Thanks Bodo!
_______________________________________________
Info-Ingres mailing list
Info-...@kettleriverconsulting.com
http://ext-cando.kettleriverconsulting.com/mailman/listinfo/info-ingres


0 new messages