pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: . <@babolo.ru>
To: creid <creid@netbcg.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: LIBPQ Question
Date: Mon, 27 Oct 2003 03:38:09 +0300 (MSK)
Message-ID: <1067215089.757529.1657.nullmailer@cicuta.babolo.ru> (raw)
In-Reply-To: <ILECJKPFOLBAGINIFFFBMECECAAA.creid@netbcg.com>

> 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




view thread (7+ messages)  latest in thread

Message-ID: <1067215089.757529.1657.nullmailer@cicuta.babolo.ru>
Permalink:  ../1067215089.757529.1657.nullmailer@cicuta.babolo.ru/
Also on:    postgresql.org/message-id/1067215089.757529.1657.nullmailer@cicuta.babolo.ru

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: @babolo.ru, creid@netbcg.com
  Subject: Re: LIBPQ Question
  In-Reply-To: <1067215089.757529.1657.nullmailer@cicuta.babolo.ru>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox