X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 8DFD0D1B4F9 for ; Mon, 27 Oct 2003 00:37:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33371-05 for ; Sun, 26 Oct 2003 20:36:46 -0400 (AST) Received: from ints.mail.pike.ru (ints.mail.pike.ru [195.9.45.194]) by svr1.postgresql.org (Postfix) with ESMTP id 6CD0CD1B4F1 for ; Sun, 26 Oct 2003 20:36:41 -0400 (AST) Received: (qmail 31309 invoked from network); 27 Oct 2003 00:59:35 -0000 Received: from babolo.ru (HELO cicuta.babolo.ru) (194.58.226.160) by ints.mail.pike.ru with SMTP; 27 Oct 2003 00:59:35 -0000 Received: (nullmailer pid 1658 invoked by uid 136); Mon, 27 Oct 2003 00:38:09 -0000 Subject: Re: LIBPQ Question X-ELM-OSV: (Our standard violations) hdr-charset=KOI8-R; no-hdr-encoding=1 In-Reply-To: To: creid Date: Mon, 27 Oct 2003 03:38:09 +0300 (MSK) From: "."@babolo.ru Cc: pgsql-interfaces@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <1067215089.757529.1657.nullmailer@cicuta.babolo.ru> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/50 X-Sequence-Number: 4539 > Problem: Assigning a COUNT(*) result into an integer variable in my C > program consistently fails except when I assign the same result to a char > variable. I can only assume that the internal data type the COUNT function > uses is integer. > > Can anyone help put me in the proper mindset so I may deal with this, > seemingly simple issue, to resolution. > > I need the integer result to to help me satisfy a dynamic memory > requirement... COUNT(*) result will tell me how many rows of data I need to > malloc and I cannot perform a math operation on a char variable. As far as I remember count() has bigint result