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: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: machine-parseable object descriptions
Date: 2013-03-18 20:31:48
Message-ID: 14247.1363638708@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:
> For Dimitri's patch to add support for dropped objects in event
> triggers, there's an open question about how to report objects that are
> being dropped in a tabular format. What I proposed last had three
> columns: (type, schema, identity). The "type" is a description of the
> object class; I propose the following list:

I'm okay with the proposed type names.

> After the object type we have the schema, which would be NULL for
> objects that don't belong to schemas (extensions, access methods, casts,
> languages, etc).

> Then we have the identity, which is a texualt representation of the
> other stuff needed to uniquely identify the object being referred to.

I think you should seriously consider dropping the separate "schema"
column and instead plugging the schema in at the appropriate place
in the identity string (which, evidently, is not always going to be
at the front). Otherwise, how will client code know how to assemble the
schema onto the identity to make a usable name? It's also pretty weird
that some of the names appearing in an identity will be fully qualified
but the most important one isn't.

I could also live with keeping the schema column as proposed, if people
think it has a use, but letting it be redundant with a schema name
included in the identity string. But it seems like a bad idea to try to
shear schema off of identity.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dimitri Fontaine 2013-03-18 20:38:36 Re: machine-parseable object descriptions
Previous Message Greg Smith 2013-03-18 20:31:00 Re: Enabling Checksums