Re: getting out boolean value from PQgetValue function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Arunachalam Parthasarathy" <arunachalamamsam(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: getting out boolean value from PQgetValue function
Date: 2008-01-12 20:39:29
Message-ID: 21754.1200170369@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Arunachalam Parthasarathy" <arunachalamamsam(at)gmail(dot)com> writes:
> When i iterate over the result set, i am unable to get the return boolean
> value in my code. The ptr returned by PQGetValue is valid, but contains
> nothing. why is it so?

Did you check PQgetisnull()? IIRC PQgetvalue() will return a
zero-length string for a null field.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-01-12 20:42:27 Re: Transaction Snapshot Cloning
Previous Message Tom Lane 2008-01-12 20:28:32 Re: A note about SIGTERM illusion and reality