Re: pg_dump failure, can't get data out...

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump failure, can't get data out...
Date: 2001-08-27 00:45:21
Message-ID: 20010826194521.A5528@lerami.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> [010826 19:39]:
> Larry Rosenman <ler(at)lerctr(dot)org> writes:
> > pg_dump: query to get function name of oid - failed: ERROR: oidin:
> > error in "-": can't parse "-"
>
> Actually, I'm seeing it here too ... seems to have been a side-effect
> of the change that I recently made to declare pg_index.indproc as
> regproc instead of plain Oid. pg_dump is expecting "0" for empty
> indproc but it's now getting "-". Hmm, maybe that change wasn't a
> good idea; is it likely to break anything besides pg_dump?
>
> Anyway, the quick-hack answer is to change line 4374 in pg_dump.c from
>
> if (strcmp(indinfo[i].indproc, "0") == 0)
>
> to
>
> if (strcmp(indinfo[i].indproc, "-") == 0 ||
> strcmp(indinfo[i].indproc, "0") == 0)
>
> You shouldn't need to revert your sources for this --- apply the patch,
> compile a new pg_dump, and use it against your yesterday's server.
>
> BTW, I have to congratulate you on your bravery. I sure wouldn't keep
> data I cared about in CVS tip ;-)
It's not totally irreplaceable, but...

Hey, I find bugs this way.

This fix gets the data out.

NOW, do we need a regression test for pg_dump?

LER

>
> regards, tom lane

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-08-27 00:52:41 Re: pg_dump failure, can't get data out...
Previous Message Tom Lane 2001-08-27 00:39:55 Re: pg_dump failure, can't get data out...