Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9BB43B5DBDE for ; Tue, 4 Oct 2011 09:21:35 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 77339-08 for ; Tue, 4 Oct 2011 12:21:29 +0000 (UTC) X-Greylist: delayed 00:05:45.148999 by SQLgrey-1.8.0-rc2 Received: from gauss.credativ.com (gauss.credativ.com [93.94.130.89]) by mail.postgresql.org (Postfix) with ESMTP id 283F6B5DBD9 for ; Tue, 4 Oct 2011 09:21:29 -0300 (ADT) Received: from feivel (exit.credativ.com [87.139.82.80]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: mme@gauss.credativ.com) by gauss.credativ.com (Postfix) with ESMTPSA id 7A9031B42CD; Tue, 4 Oct 2011 14:15:40 +0200 (CEST) Received: by feivel (Postfix, from userid 1000) id 9641110AA52; Tue, 4 Oct 2011 14:15:39 +0200 (CEST) Date: Tue, 4 Oct 2011 14:15:39 +0200 From: Michael Meskes To: Jim Gray Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #6238: ECPG converts "long long" to long on Windows Message-ID: <20111004121539.GA9786@feivel.credativ.lan> References: <201110032246.p93MkNb9070001@wwwmaster.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201110032246.p93MkNb9070001@wwwmaster.postgresql.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201110/26 X-Sequence-Number: 31296 Hi Jim, > Postgres 9.1.1 installed on a Windows XP PC. > Running ECPG with "long long" data type specified in the SQL DECLARE SECTION > results in "long" being used instead. The same input file works OK on Linux This suggests that HAVE_LONG_LONG_INT was not defined during ecpg build. Or in other words ecpg thinks long long is not supported. > with Postgres 9.0.3 Manually changing the data type to "long long" in the > ECPG output file on Windows: > ECPGt_long_long,&(_cpp_i_pkd1),(long)1,(long)1,sizeof(long long) -- results > in run time error "unsupported data type". I am using MS Visual C++ Express Did you also change the variable definition to long long? > 2010 on Windows, which accepts "long long" to mean the same thing as > __int64, but ECPG doesn't recognize the later. > May be related to BUG #5464: ecpg on 64bit system converts "long long" to > "long" Well, this bug is (at least I don't know otherwise) fixed for more than a year. Maybe the configure test doesn't work on Windows? I don't know. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org Jabber: michael.meskes at googlemail dot com VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL