From: Michael Meskes <meskes@postgresql.org>
To: asergioz@bol.com.br
Cc: PostgreSQL Interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: Calculations With NUMERIC Data Type In C Program
Date: Sun, 24 Jun 2001 14:39:03 +0200
Message-ID: <20010624143903.A30948@feivel.fam-meskes.de> (raw)
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!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: meskes@postgresql.org, asergioz@bol.com.br
Subject: Re: Calculations With NUMERIC Data Type In C Program
In-Reply-To: <20010624143903.A30948@feivel.fam-meskes.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox