<div dir="ltr">Hello.<div style="style">I'm trying to create a generic add function.</div><div style="style">I have
defineda type my_uint and it needs a '+' operator.</div><div style="style">This operator should work like normal int +
intoperation.</div><div style="style">The function is defined expecting arguments (my_uint, anyelement).</div><div
style="style"><br/></div><div style="style">I'm confused in retrieving the anyelement type, value and than do the add
operationand return the correct value and type.</div><div style="style">I tried to use PG_GETARG_DATUM, but I don't
knowhow to extract the value from it (should it be a uint32, uint64, float or double).</div><div style="style"><br
/></div><divstyle="style">Any tips?</div><div style="style"><br /></div><div style="style"><br /></div></div>