Re: Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alan Nilsson <anilsson(at)apple(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Robert Nix <robert(at)urban4m(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Segmentation fault: pg_upgrade 9.1 to 9.3: pg_dump: row number 0 is out of range 0..-1
Date: 2013-10-26 13:53:06
Message-ID: 11373.1382795586@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alan Nilsson <anilsson(at)apple(dot)com> writes:
> I ran into something tonight that seems relevant here, or certainly related:
> I recently updated my app(s) libpq version from 9.1 to 9.3 and immediately I starting seeing:

> row number 0 is out of range 0..-1

> spewed to stdout.

> I traced it down to this code:

> if (PQresultStatus(result) == PGRES_TUPLES_OK){
> if (!PQgetisnull(result, 0, 0)){
> ......
> }
> }

I can find no code like that in the PG sources --- everyplace that does
"PQgetisnull(result, 0, 0)" prefaces it with a check that there's at least
one row in the result. I think you're blaming the messenger.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2013-10-26 14:23:12 Re: Increasing CPU usage of PostgreSQL
Previous Message Marc Mamin 2013-10-26 07:11:33 Re: Detecting change in event properties