Re: LIBPQ Question - Mailing list pgsql-interfaces

From ."@babolo.ru
Subject Re: LIBPQ Question
Date
Msg-id 1067215089.757529.1657.nullmailer@cicuta.babolo.ru
Whole thread Raw
In response to LIBPQ Question  ("creid" <creid@netbcg.com>)
List pgsql-interfaces
> 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



pgsql-interfaces by date:

Previous
From: "creid"
Date:
Subject: LIBPQ Question
Next
From: Tomasz Myrta
Date:
Subject: Re: LIBPQ