Skip site navigation (1) Skip section navigation (2)

Re: [RFC] Common object property boards

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kohei Kaigai <Kohei(dot)Kaigai(at)EMEA(dot)NEC(dot)COM>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "robertmhaas(at)gmail(dot)com" <robertmhaas(at)gmail(dot)com>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
Subject: Re: [RFC] Common object property boards
Date: 2011-07-29 17:49:30
Message-ID: 29147.1311961770@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Kohei Kaigai <Kohei(dot)Kaigai(at)EMEA(dot)NEC(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Nikhil SontakkeDate: 2011-07-29 18:12:37
Subject: Re: Check constraints on partition parents only?
Previous:From: Matt KeranenDate: 2011-07-29 16:54:32
Subject: Re: OT: OFF TOPIC: returning multiple result sets from a stored procedure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group