Received: from feivel.fam-meskes.de ([212.144.6.50]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f5OCdua63585 for ; Sun, 24 Jun 2001 08:39:57 -0400 (EDT) (envelope-from michael@fam-meskes.de) Received: by feivel.fam-meskes.de (Postfix, from userid 1000) id BBDA3A6030; Sun, 24 Jun 2001 14:39:03 +0200 (CEST) Date: Sun, 24 Jun 2001 14:39:03 +0200 From: Michael Meskes To: asergioz@bol.com.br Cc: PostgreSQL Interfaces Subject: Re: Calculations With NUMERIC Data Type In C Program Message-ID: <20010624143903.A30948@feivel.fam-meskes.de> Mail-Followup-To: asergioz@bol.com.br, PostgreSQL Interfaces Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.18i X-Archive-Number: 200106/74 X-Sequence-Number: 1737 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!