[postgis-users] error in geometry operations
Michael Fuhr
mike at fuhr.org
Sun Aug 20 17:02:59 PDT 2006
On Sun, Aug 20, 2006 at 06:23:15PM -0500, P Kishor wrote:
> On 8/20/06, Michael Fuhr <mike at fuhr.org> wrote:
> >On Sun, Aug 20, 2006 at 05:12:42PM -0500, P Kishor wrote:
> >> oh crap! row number -1 is out of range 0..-1
> >
> >That looks like an error from libpq, the client-side C API. What
> >client interface are you using? Apparently the query returned zero
> >rows but the client software tried to fetch a row.
>
> Methinks you are correct. My query does seem to be returning zero rows
> (which it should not be doing -- see my reply to Paul Ramsey's
> questions). Wrt what client I am using -- well, this is the stock
> pgAdmin tool that comes with the software... is that what you mean?
Yeah, that's what I meant, although pgAdmin is actually a third-party
tool; some installation packages include it but it's not a stock
PostgreSQL component. If you run the query with psql then you'll
probably get zero rows and no error. The error might be a pgAdmin
bug -- as I mentioned, it looks like it's from libpq (specifically
from src/interfaces/libpq/fe-exec.c), as though the client called
PQgetvalue(), PQgetlength(), or PQgetisnull() with a result that
has no rows. Or the bug could be in libpq if one if its other
functions is making the bad call. None of this addresses the real
problem -- why the query returns no rows -- but it might explain
the error message.
--
Michael Fuhr
More information about the postgis-users
mailing list