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 26574D1B545 for ; Sun, 26 Oct 2003 23:09:19 +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 24309-01 for ; Sun, 26 Oct 2003 19:08:49 -0400 (AST) Received: from mail.netbcg.com (ip-216-46-80-134.dsl.ewr.megapath.net [216.46.80.134]) by svr1.postgresql.org (Postfix) with SMTP id 85770D1B4EF for ; Sun, 26 Oct 2003 19:08:46 -0400 (AST) Received: (qmail 6084 invoked from network); 26 Oct 2003 23:08:30 -0000 Received: from ip-216-46-80-134.dsl.ewr.megapath.net (HELO genesis) (216.46.80.134) by 0 with SMTP; 26 Oct 2003 23:08:30 -0000 From: "creid" To: Subject: LIBPQ Question Date: Sun, 26 Oct 2003 18:08:49 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/49 X-Sequence-Number: 4538 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. Thanks Cliff