Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] [BUG?] strange PQgetisnull

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: pcs(at)bmail(dot)kek(dot)jp
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] [BUG?] strange PQgetisnull
Date: 1998-07-16 15:27:11
Message-ID: 199807161527.LAA01638@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
> Hi all,
> 
>     I got strange result with PQgetisnull, say
> 
> for empty table(I think that it's empty so null)
> 
> I guess that
> after fetch some selection
> PQgetisnull(result, 0, 0) should give me "1 or true"
> But
> it gives me
> ERROR! field 0(of 0) of row 0(of 0) is not available... Segmentation
> Fault

You can't check for isnull on a Result that returns no rows.  It is only
for looking at fields of an existing returned row.

-- 
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

pgsql-hackers by date

Next:From: Bruce MomjianDate: 1998-07-16 15:33:35
Subject: Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous:From: andreDate: 1998-07-16 14:59:33
Subject: Large objects buffer leak

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group