Re: LIBPQ Question

From: "(dot)"(at)babolo(dot)ru
To: creid <creid(at)netbcg(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: LIBPQ Question
Date: 2003-10-27 00:38:09
Message-ID: 1067215089.757529.1657.nullmailer@cicuta.babolo.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message ljb 2003-10-27 02:33:58 pgtcl large object read/write corrupts binary data
Previous Message creid 2003-10-26 23:08:49 LIBPQ Question