Calculations with NUMERIC data type

From: "asergioz"<asergioz(at)bol(dot)com(dot)br>
To: meskes(at)postgresql(dot)org
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Calculations with NUMERIC data type
Date: 2001-07-16 20:34:38
Message-ID: GGL2HQ$IqzSBLdOMTmhI5xs9tU5PbdeYFT4vD1WwF@bol.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi,

I need to perform many calculations,
in an application written in C, with
data returned from lots of fields of
the NUMERIC (17, 7) data type and
update those fields with the results
of the calculations.
I am using the ECPG interface to
access the PostgreSQL database and I
want to use the numeric_*() functions
in the application code, as the
NUMERIC data type is not a stardard C
data type.
I' ve looked up in the documentation
and in the source files but I
still have doubts about the correct
way to use the numeric_*()
functions.
Please, could someone provide some
hints about how to pass the values
returned from a query to a numeric_*()
function, and how to retrieve the
result to update the database?
Any help will be greatly appreciated.

Regards,

Antonio Sergio de Mello e Souza


__________________________________________________________________________
Acesso pelo menor preo do mercado! R$ 14,90 nos 3 primeiros meses!
ASSINE AGORA! http://www.bol.com.br/acessobol/

Browse pgsql-interfaces by date

  From Date Subject
Next Message Darko Prenosil 2001-07-16 22:46:20 WIN32 NON-BLOCKING
Previous Message Bruce Momjian 2001-07-16 20:12:55 Re: LIBPQ WIN32 NON-BLOCKING