X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 0DA8CD9D20 for ; Sat, 1 Oct 2005 05:31:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 85751-02 for ; Sat, 1 Oct 2005 08:30:57 +0000 (GMT) Received: from Mail2.KONTENT.De (mail2.kontent.de [81.88.34.59]) by svr1.postgresql.org (Postfix) with ESMTP id 0224ED9CFC for ; Sat, 1 Oct 2005 05:30:57 -0300 (ADT) Received: from jedi.behrens.de (p508581AC.dip0.t-ipconnect.de [80.133.129.172]) by Mail2.KONTENT.De (Postfix) with ESMTP id B0CF23880E0 for ; Sat, 1 Oct 2005 10:30:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by jedi.behrens.de (Postfix) with ESMTP id EC1591ADE8 for ; Sat, 1 Oct 2005 10:30:56 +0200 (CEST) Received: from jedi.behrens.de ([127.0.0.1]) by localhost (jedi [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09277-01 for ; Sat, 1 Oct 2005 10:30:56 +0200 (CEST) Received: from anakin (anakin.behrens.de [192.168.150.240]) by jedi.behrens.de (Postfix) with ESMTP id C870A19DD1 for ; Sat, 1 Oct 2005 10:30:56 +0200 (CEST) From: lothar.behrens@lollisoft.de To: pgsql-odbc@postgresql.org Date: Sat, 01 Oct 2005 10:30:56 +0200 MIME-Version: 1.0 Subject: Re: select count(*) datatype ? Message-ID: <433E6560.14220.6D253B@localhost> In-reply-to: <433D7C9F.19166.1ECB6C5@localhost> References: <20334.1128088493@sss.pgh.pa.us> X-mailer: Pegasus Mail for Windows (4.21c, DE v4.21c R1a) Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: Quoted-printable Content-description: Mail message body X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.213 required=5 tests=[AWL=-0.015, FORGED_RCVD_HELO=0.05, NO_REAL_NAME=0.178] X-Spam-Level: X-Archive-Number: 200510/2 X-Sequence-Number: 6104 Am 30 Sep 2005 um 17:57 hat lothar.behrens@lollisoft.de geschrieben: I have solved that problem. Open Watcom has a function atoll and lltoa for= long long conversion. I'll try this on Linux and Mac later, there may be simila= r functions. Lothar > Am 30 Sep 2005 um 9:54 hat Tom Lane geschrieben: > > > lothar.behrens@lollisoft.de writes: > > > what type of column is an aggregated value of count ? > > > > bigint, at least in recent PG releases. > > > > regards, tom lane > > > > Thanks, > > but now I am a little confused about how to convert those datatypes to a= char[] type. > > I write long datatypes from char[] array into bound buffer: > > long l =3D 0; > l =3D atol("long value"); > long* pl =3D (long*) buffer; > void* b =3D pl+1; > memcpy(b, &l, sizeof(l)); > > I read long datatypes into char[] array from bound buffer: > > char charrep[100] =3D ""; > sprintf(charrep, "%d", *(long*) buffer); > result->setData(charrep); > > How do I this for bigint datatypes (long long as I think) ? > > Thanks > > Lothar > > -- > Lothar Behrens | Rapid Prototyping ... > Rosmarinstr 3 | > 40235 D=FCsseldorf | www.lollisoft.de > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 6: explain analyze is your friend > -- Lothar Behrens | Rapid Prototyping ... Rosmarinstr 3 | 40235 D=FCsseldorf | www.lollisoft.de