Re: machine-parseable object descriptions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: machine-parseable object descriptions
Date: 2013-03-20 18:51:09
Message-ID: 8399.1363805469@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> One change I made was to move all the new code from dependency.c into
> objectaddress.c. The only reason it was in dependency.c was that
> getObjectDescription was there in the first place; but it doesn't seem
> to me that it really belongs there. (Back when it was first created,
> there was no objectaddress.c at all, and dependency.c was the only user
> of it.) If there were no backpatching considerations, I would suggest
> we move getObjectDescription() to objectaddress.c as well, but I'm not
> sure it's worth the trouble, but I'm not wedded to that if somebody
> thinks both things should be kept together.

+1 for moving getObjectDescription to objectaddress.c. As you say,
that's probably where it would've been if that file had existed at
the time. I don't recall that we've had to back-patch many changes
in that function, so I don't think that concern is major.

> Finally: it'd be nice to be able to get pg_am identities with these
> functions too. Then you could use a simple query to get object
> identities + descriptions from pg_description (right now you have to
> exclude that catalog specifically, otherwise the query bombs out). But
> it'd be a lot of trouble, and since these objects are not really
> pluggable, I'm not bothering. We can always add it later if there's
> more interesting use for it.

I think that would be a good thing to add, but no objection to leaving
it for a follow-on patch.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2013-03-20 18:54:23 Re: Let's invent a function to report lock-wait-blocking PIDs
Previous Message Alvaro Herrera 2013-03-20 18:37:12 Re: Let's invent a function to report lock-wait-blocking PIDs