Re: [GENERAL] detecting NULL from libpq...

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: dhm(at)paradigm(dot)webvision(dot)com (dave madden)
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] detecting NULL from libpq...
Date: 1998-06-20 03:25:35
Message-ID: 199806200325.XAA06727@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> Hi. I'm wondering if it's possible to tell whether a field returned
> by PQgetvalue() is NULL? Can one distinguish between a varchar field
> that contains a string of zero length and a varchar field that is
> NULL? (And if so, how? :-)

>From man libpq:

PQgetisnull returns the NULL status of a field.
int PQgetisnull(PGresult *res,
int tup_num,
int field_num);

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Herouth Maoz 1998-06-21 08:45:25 Re: [GENERAL] User Gallery...
Previous Message Bruce Momjian 1998-06-20 03:21:48 Re: [GENERAL] Libpq++ autenthication problem II