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

Re: BUG #5268: PQgetvalue incorrectly returns 0

From: Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>
To: Mike Landis <mlandis(at)pnmx(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #5268: PQgetvalue incorrectly returns 0
Date: 2010-01-08 00:31:30
Message-ID: 4B467CE2.9020001@catalyst.net.nz (view raw or flat)
Thread:
Lists: 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


In response to

Responses

pgsql-bugs by date

Next:From: Robert HaasDate: 2010-01-08 02:17:49
Subject: Re: BUG #5268: PQgetvalue incorrectly returns 0
Previous:From: Alvaro HerreraDate: 2010-01-08 00:07:09
Subject: Re: BUG #5268: PQgetvalue incorrectly returns 0

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