c language functions - Mailing list pgsql-hackers

From Rodrigo Barboza
Subject c language functions
Date
Msg-id CANs8QJYY58rB+bprkSnxsSePJc2EazgUGpBs90Et_bd__9in5Q@mail.gmail.com
Whole thread Raw
Responses Re: c language functions
List pgsql-hackers
<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> 

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Regex with > 32k different chars causes a backend crash
Next
From: Gavin Flower
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)