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

Re: row number -1 is out of range 0..-1

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Bobi Ivanov <bobi(at)exsisto(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: row number -1 is out of range 0..-1
Date: 2005-06-28 12:58:44
Message-ID: 20050628125844.GA23489@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, Jun 28, 2005 at 03:11:03PM +0300, Bobi Ivanov wrote:
>
>     I get this message 'row number -1 is out of range 0..-1' sometimes. 
> I say sometimes, because this happens unexpected when I submit absolutely 
> correct query. Query succeeds, but it returns no resul although there should be.

The above error happens if a program calls PQgetvalue(), PQgetlength(),
or PQgetisnull() with a row number of -1 and if there were no rows
in the result.  Are you calling those libpq functions directly, or
are you using an interface that sits on top of libpq?  If the latter,
what interface and version are you using?  What version of PostgreSQL?
What does your code look like?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Responses

pgsql-bugs by date

Next:From: Szűcs GáborDate: 2005-06-28 13:05:12
Subject: Select on pkey returned more than one row
Previous:From: Borislav IvanovDate: 2005-06-28 12:18:08
Subject: BUG #1735: row number -1 is out of range 0..-1 error

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