Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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/



pgsql-interfaces by date

Next:From: Darko PrenosilDate: 2001-07-16 22:46:20
Subject: WIN32 NON-BLOCKING
Previous:From: Bruce MomjianDate: 2001-07-16 20:12:55
Subject: Re: LIBPQ WIN32 NON-BLOCKING

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group