Re: Calculations With NUMERIC Data Type In C Program

Поиск
Список
Период
Сортировка
От Michael Meskes
Тема Re: Calculations With NUMERIC Data Type In C Program
Дата
Msg-id 20010624143903.A30948@feivel.fam-meskes.de
обсуждение исходный текст
Ответ на Calculations With NUMERIC Data Type In C Program  ("asergioz"<asergioz@bol.com.br>)
Список pgsql-interfaces
On Sat, Jun 23, 2001 at 06:16:48PM -0300, asergioz wrote:
> ...
> PostgreSQL.  I need to perform several
> calculations, in a C program, with
> data returned from lots of fields of
> the NUMERIC (17, 7)
> data type.
> ... 
> EXEC SQL BEGIN DECLARE SECTION;
> numeric(17, 7)     var_1;
> numeric(17, 7)     var_2;
> long               key = 123;
> EXEC SQL END DECLARE SECTION;

I do not know that there is a numeric datatype in C. The datatype's given in
the declare section have to be C types.

> Please, does the ECPG interface work
> with variables of the NUMERIC data
> type, as shown above?

If you can map them to a C datatype yes.

> If not, what are the alternatives?

This is the same problem you run into with any embedded SQL preprocessor
there is.

Michael
-- 
Michael Meskes
Michael@Fam-Meskes.De
Go SF 49ers! Go Rhein Fire!
Use Debian GNU/Linux! Use PostgreSQL!


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Cedar Cox
Дата:
Сообщение: Re: passing Windows NT user name to postgres triggers for logging
Следующее
От: Markus Wagner
Дата:
Сообщение: Re: passing Windows NT user name to postgres triggers for logging