[BUG?] strange PQgetisnull

From: "Park, Chul-Su" <pcs(at)mhlx01(dot)kek(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [BUG?] strange PQgetisnull
Date: 1998-07-16 08:10:43
Message-ID: 35ADB583.4FFBE4CD@mhlx01.kek.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

so I tried
if (PQntuples(result) == 0)
...

But PQntules gives me "1" not "0" !

do I have to check result with
char* value = PQgetvalue(result, 0, 0);
and test value is "" or not? any idea???

I'm using v6.3.2 on linux && Solaris.

Best Regards, C.S.Park

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 1998-07-16 08:30:11 Re: [INTERFACES] Re: [HACKERS] changes in 6.4
Previous Message Maarten Boekhold 1998-07-16 07:45:18 Re: [INTERFACES] Re: [HACKERS] changes in 6.4