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: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, postgres hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump with postgis extension dumps rules separately
Date: 2013-06-04 02:57:03
Message-ID: 13907.1370314623@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 was surprised by a couple of things looking at this code. First,
> getRules() is written differently than other table subsidiary objects'
> get functions. Secondly, I would have expected
> getExtensionMembership() to be recursive -- instead it looks to only
> go one level deep. Perhaps the longer term fix would be to identify
> extension dependencies recursively, and then the reliance on strict
> ordering here could be relaxed. But I don't think we want to make that
> change in 9.3 at this point.

I'm not sure that's appropriate: extension membership is not a recursive
concept AFAICS. In any case, as you say, it's something for more
analysis later.

> Objections to this version?

I'd have put the getRules call where getEventTriggers is now, or at
least adjacent to getTriggers in one direction or the other. I'm
not sure there is anything functionally wrong with what you have here;
but IMO rules and table-level triggers are pretty much the same kind
of critters so far as pg_dump is concerned, to wit, they're table
properties not free-standing objects (which is exactly the point of this
change). So it seems to me to make sense to process them together.

BTW, don't forget that the getRules move needs to be back-patched.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2013-06-04 04:52:04 Re: MVCC catalog access
Previous Message Joe Conway 2013-06-04 02:37:23 Re: pg_dump with postgis extension dumps rules separately