Re: [RFC] Common object property boards - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [RFC] Common object property boards
Date
Msg-id 29147.1311961770@sss.pgh.pa.us
Whole thread Raw
In response to [RFC] Common object property boards  (Kohei Kaigai <Kohei.Kaigai@EMEA.NEC.COM>)
Responses Re: [RFC] Common object property boards
Re: [RFC] Common object property boards
List pgsql-hackers
Kohei Kaigai <Kohei.Kaigai@EMEA.NEC.COM> writes:
> In addition to this suggestion, I think the big static array also contains
> the following items:
> - Text form of the object type (e.g, "table", "function", ...)

What will you do with that that wouldn't be better done by calling
getObjectDescription?  The latter's output is somewhat localizable, but
individual words would be hard to translate.

> Does the main lookup function ought to return an entry of the big array?
> If so, the definition of structure should be declared in objectaddress.h,
> as follows:

It would likely be better to not expose the struct type, just individual
lookup functions.

> And, a translation from ObjectType to type name (e.g "table", "type", ...)
> is helpful to generate error messages.

>   const char *get_object_type_name(ObjectType objtype);

Again, I think this is too low level because of message translation
considerations.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Matt Keranen
Date:
Subject: Re: OT: OFF TOPIC: returning multiple result sets from a stored procedure
Next
From: Nikhil Sontakke
Date:
Subject: Re: Check constraints on partition parents only?