numeric data type
От
Juan Pablo L.
Тема
numeric data type
Дата
Msg-id
DUB130-W782DF3194327931E9B755AD9450@phx.gbl
Ответ на
numeric (Juan Pablo L.)
Список
Дерево обсуждения
numeric Juan Pablo L. <jpablolorenzetti@hotmail.com>
numeric data type Juan Pablo L. <jpablolorenzetti@hotmail.com>
Re: numeric data type Tom Lane <tgl@sss.pgh.pa.us>
Re: numeric data type Juan Pablo L. <jpablolorenzetti@hotmail.com>
Re: numeric data type Alvaro Herrera <alvherre@2ndquadrant.com>
Re: numeric data type Juan Pablo L. <jpablolorenzetti@hotmail.com>
Re: numeric data type Alvaro Herrera <alvherre@2ndquadrant.com>
Re: numeric data type Juan Pablo L. <jpablolorenzetti@hotmail.com>
Hi, i m writing a C module (extension), the procedure has a parameter that is of type numeric,
inside the function i can not read the parameter or so it seems, this what is do:
float8 db_balance,in_chgval;
in_chgval = PG_GETARG_FLOAT8(2);
elog(INFO,"in_chgval = %0.2f",in_chgval);
The above elog, always shows cero, more over, i m also trying to read a
numeric from the database and substracted from the in_chgval parameter,
the operation always gives 0,, so apparently i can not read a numeric from a
data base:
db_balance = DatumGetFloat8(SPI_getbinval(SPI_tuptable->vals[0],SPI_tuptable->tupdesc,1,&is_null));
elog(INFO,"db_balance(%f) - in_chgval(%f) = %f",db_balance,in_chgval,(db_balance - in_chgval));
it shows all 0 ..... please any advise would be really appreciated. thank you!!
float8 db_balance,in_chgval;
in_chgval = PG_GETARG_FLOAT8(2);
elog(INFO,"in_chgval = %0.2f",in_chgval);
The above elog, always shows cero, more over, i m also trying to read a
numeric from the database and substracted from the in_chgval parameter,
the operation always gives 0,, so apparently i can not read a numeric from a
data base:
db_balance = DatumGetFloat8(SPI_getbinval(SPI_tuptable->vals[0],SPI_tuptable->tupdesc,1,&is_null));
elog(INFO,"db_balance(%f) - in_chgval(%f) = %f",db_balance,in_chgval,(db_balance - in_chgval));
it shows all 0 ..... please any advise would be really appreciated. thank you!!
В списке pgsql-general по дате отправления