Re: BUG #5268: PQgetvalue incorrectly returns 0 - Mailing list pgsql-bugs

From Mark Kirkwood
Subject Re: BUG #5268: PQgetvalue incorrectly returns 0
Date
Msg-id 4B467CE2.9020001@catalyst.net.nz
Whole thread Raw
In response to Re: BUG #5268: PQgetvalue incorrectly returns 0  (Mike Landis <mlandis@pnmx.com>)
Responses Re: BUG #5268: PQgetvalue incorrectly returns 0  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
Mike Landis wrote:
> Pick a database and table that exists, configure the string
> cconstants, compile and run the attached cpp, get 0 instead of 1 (that
> you get in pgAdmin...
>
> Where's can I download the libpq source?  Maybe I can find and/or fix
> the problem myself.

Your program works fine for me (apart from minor datatype changes to
port to Linux). I used user=postgres and database=regression and
pgtable='tenk1' (schema from the regression test suite). As Tom
mentioned, your user might not have access to the table you are using -
try using the superuser account - typically 'postgres' to eliminate this
possibility.

With respect to the libpq source, it is in the source tarball from the
Postgresql website (directory src/interfaces/libpq ).

regards

Mark

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: BUG #5268: PQgetvalue incorrectly returns 0
Next
From: Robert Haas
Date:
Subject: Re: BUG #5268: PQgetvalue incorrectly returns 0