Re: C-language example of using/returning numeric - Mailing list pgsql-general

From Tom Lane
Subject Re: C-language example of using/returning numeric
Date
Msg-id 25971.1032182136@sss.pgh.pa.us
Whole thread Raw
In response to C-language example of using/returning numeric  (Mike Mascari <mascarm@mascari.com>)
List pgsql-general
Mike Mascari <mascarm@mascari.com> writes:
> Does anyone happen to have a server-side C-language example of
> using the Version-1 calling conventions with the NUMERIC data
> type?

utils/adt/numeric.c is full of examples --- just add the
PG_FUNCTION_INFO_V1() macro and you have a perfectly good external
function.

> Are there any helper functions available to the C-language
> server-side developer wrt numeric?

They are all in numeric.c ... unfortunately, they're mostly static.

What exactly do you need to do?

            regards, tom lane

pgsql-general by date:

Previous
From: Jochem van Dieten
Date:
Subject: Re: sum(if command
Next
From: Tino Wildenhain
Date:
Subject: problems to restore database with custom datatypes (e.g. txtidx)