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

[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: (view raw, whole thread or download thread mbox)
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"
it gives me
ERROR! field 0(of 0) of row 0(of 0) is not available... Segmentation

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


pgsql-hackers by date

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

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