Re: pg_dump problems against 7.0 - Mailing list pgsql-patches

From Christopher Kings-Lynne
Subject Re: pg_dump problems against 7.0
Date
Msg-id 3F948221.2050007@familyhealth.com.au
Whole thread Raw
In response to Re: pg_dump problems against 7.0  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump problems against 7.0
List pgsql-patches
> Won't that result in *everything* being considered a system table?

Doh.  Quite right.  Well, the 7.0 initdb creates pg_indexes as the last
thing it does.  (Even though there are higher oids in pg_attribute,
pg_rewrite and pg_description.), so how about the attached patch?

Chris

Index: pg_dump.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/pg_dump/pg_dump.c,v
retrieving revision 1.353
diff -c -r1.353 pg_dump.c
*** pg_dump.c    8 Oct 2003 03:52:32 -0000    1.353
--- pg_dump.c    21 Oct 2003 00:44:10 -0000
***************
*** 5876,5882 ****
      int            last_oid;

      res = PQexec(g_conn,
!               "SELECT oid from pg_database where datname = 'template1'");
      if (res == NULL ||
          PQresultStatus(res) != PGRES_TUPLES_OK)
      {
--- 5876,5882 ----
      int            last_oid;

      res = PQexec(g_conn,
!               "SELECT oid FROM pg_class WHERE relname='pg_indexes'");
      if (res == NULL ||
          PQresultStatus(res) != PGRES_TUPLES_OK)
      {

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump problems against 7.0
Next
From: Tom Lane
Date:
Subject: Re: pg_dump problems against 7.0