Re: pg_dump with postgis extension dumps rules separately

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump with postgis extension dumps rules separately
Date: 2013-06-01 15:57:09
Message-ID: 21686.1370102229@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Joe Conway <mail(at)joeconway(dot)com> writes:
> I can look at having pg_dump ignore these entries, but I suspect that
> will be quite a bit more invasive.

Actually, I believe the answer is just that getSchemaData() is doing
things in the wrong order:

if (g_verbose)
write_msg(NULL, "reading rewrite rules\n");
getRules(fout, &numRules);

/*
* Identify extension member objects and mark them as not to be dumped.
* This must happen after reading all objects that can be direct members
* of extensions, but before we begin to process table subsidiary objects.
*/
if (g_verbose)
write_msg(NULL, "finding extension members\n");
getExtensionMembership(fout, extinfo, numExtensions);

Per that comment, getRules() should be called down where indexes,
constraints, and triggers are processed.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-06-01 16:39:08 Re: pg_dump with postgis extension dumps rules separately
Previous Message Joe Conway 2013-06-01 15:39:11 Re: pg_dump with postgis extension dumps rules separately