Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Robert Haas
On Mon, Aug 8, 2011 at 12:49 PM, Alvaro Herrera wrote: > Excerpts from Robert Haas's message of lun ago 08 12:33:45 -0400 2011: >> On Mon, Aug 8, 2011 at 12:22 PM, Alvaro Herrera >> wrote: >> > Excerpts from Robert Haas's message of lun ago 08 12:05:05 -0400 2011: >> >> We could do that, but what

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Robert Haas
On Mon, Aug 8, 2011 at 1:16 PM, Tom Lane wrote: > Robert Haas writes: >> We could do that, but what the heck is the point?   What benefit are >> we trying to get by not returning a pointer to the structure? > > Not having an ABI break if we find it necessary to add members to the > struct ... whi

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Tom Lane
Robert Haas writes: > We could do that, but what the heck is the point? What benefit are > we trying to get by not returning a pointer to the structure? Not having an ABI break if we find it necessary to add members to the struct ... which I grant is unlikely to happen in a minor version update

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Alvaro Herrera
Excerpts from Robert Haas's message of lun ago 08 12:33:45 -0400 2011: > On Mon, Aug 8, 2011 at 12:22 PM, Alvaro Herrera > wrote: > > Excerpts from Robert Haas's message of lun ago 08 12:05:05 -0400 2011: > >> We could do that, but what the heck is the point?   What benefit are > >> we trying to g

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Kohei KaiGai
2011/8/8 Robert Haas : > On Mon, Aug 8, 2011 at 11:57 AM, Alvaro Herrera > wrote: >> Excerpts from Kohei KaiGai's message of lun ago 08 03:12:20 -0400 2011: >> >>> Thanks for your suggestion. >>> So, it seems to me the interface should return a pointer to the entry >>> of array being specified, ra

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Alvaro Herrera
Excerpts from Kohei KaiGai's message of lun ago 08 12:18:47 -0400 2011: > 2011/8/8 Robert Haas : > > We could do that, but what the heck is the point?   What benefit are > > we trying to get by not returning a pointer to the structure?  I feel > > like we're making this ludicrously complicated wit

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Robert Haas
On Mon, Aug 8, 2011 at 12:22 PM, Alvaro Herrera wrote: > Excerpts from Robert Haas's message of lun ago 08 12:05:05 -0400 2011: >> We could do that, but what the heck is the point?   What benefit are >> we trying to get by not returning a pointer to the structure?  I feel >> like we're making this

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Alvaro Herrera
Excerpts from Robert Haas's message of lun ago 08 12:05:05 -0400 2011: > We could do that, but what the heck is the point? What benefit are > we trying to get by not returning a pointer to the structure? I feel > like we're making this ludicrously complicated with no real > justification of why

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Robert Haas
On Mon, Aug 8, 2011 at 11:57 AM, Alvaro Herrera wrote: > Excerpts from Kohei KaiGai's message of lun ago 08 03:12:20 -0400 2011: > >> Thanks for your suggestion. >> So, it seems to me the interface should return a pointer to the entry >> of array being specified, rather than above approach. >> >>

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Alvaro Herrera
Excerpts from Kohei KaiGai's message of lun ago 08 03:12:20 -0400 2011: > Thanks for your suggestion. > So, it seems to me the interface should return a pointer to the entry > of array being specified, rather than above approach. > > E.g, the above macro could be probably rewritten as follows: >

Re: [HACKERS] [RFC] Common object property boards

2011-08-08 Thread Kohei KaiGai
2011/8/7 Tom Lane : > Kohei KaiGai writes: >> I'm under implementation of this code according to the suggestion. >> However, I'm not sure whether it is really portable way (at least, GCC >> accepts), >> and whether the interface is simpler than as Robert suggested at first. > >> #define get_objec

Re: [HACKERS] [RFC] Common object property boards

2011-08-07 Thread Tom Lane
Kohei KaiGai writes: > I'm under implementation of this code according to the suggestion. > However, I'm not sure whether it is really portable way (at least, GCC > accepts), > and whether the interface is simpler than as Robert suggested at first. > #define get_object_property_attnum_name(objty

Re: [HACKERS] [RFC] Common object property boards

2011-08-07 Thread Kohei KaiGai
>>> So add a bunch of macros on top for the two or three (five?) most common >>> cases -- say those that occur 3 times or more. >> >> I could go for that. >> > OK, I'll try to implement according to the idea. > I'm under implementation of this code according to the suggestion. However, I'm not sure

Re: [HACKERS] [RFC] Common object property boards

2011-08-02 Thread Kohei KaiGai
2011/8/2 Robert Haas : > On Mon, Aug 1, 2011 at 4:27 PM, Alvaro Herrera > wrote: >> Excerpts from Robert Haas's message of lun ago 01 16:12:56 -0400 2011: >>> On Mon, Aug 1, 2011 at 4:02 PM, Alvaro Herrera >>> wrote: >>> > Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011: >>

Re: [HACKERS] [RFC] Common object property boards

2011-08-01 Thread Robert Haas
On Mon, Aug 1, 2011 at 4:27 PM, Alvaro Herrera wrote: > Excerpts from Robert Haas's message of lun ago 01 16:12:56 -0400 2011: >> On Mon, Aug 1, 2011 at 4:02 PM, Alvaro Herrera >> wrote: >> > Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011: >> >> 2011/7/29 Tom Lane : >> > >

Re: [HACKERS] [RFC] Common object property boards

2011-08-01 Thread Alvaro Herrera
Excerpts from Robert Haas's message of lun ago 01 16:12:56 -0400 2011: > On Mon, Aug 1, 2011 at 4:02 PM, Alvaro Herrera > wrote: > > Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011: > >> 2011/7/29 Tom Lane : > > > >> > It would likely be better to not expose the struct type,

Re: [HACKERS] [RFC] Common object property boards

2011-08-01 Thread Robert Haas
On Mon, Aug 1, 2011 at 4:02 PM, Alvaro Herrera wrote: > Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011: >> 2011/7/29 Tom Lane : > >> > It would likely be better to not expose the struct type, just individual >> > lookup functions. >> > >> If so, individual functions to expo

Re: [HACKERS] [RFC] Common object property boards

2011-08-01 Thread Alvaro Herrera
Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011: > 2011/7/29 Tom Lane : > > It would likely be better to not expose the struct type, just individual > > lookup functions. > > > If so, individual functions to expose a certain property of the supplied > object type should be p

Re: [HACKERS] [RFC] Common object property boards

2011-07-30 Thread Kohei KaiGai
2011/7/29 Tom Lane : > Kohei Kaigai 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 > getObjectDesc

Re: [HACKERS] [RFC] Common object property boards

2011-07-29 Thread Robert Haas
On Fri, Jul 29, 2011 at 1:49 PM, Tom Lane wrote: > It would likely be better to not expose the struct type, just individual > lookup functions. I'm not sure about that... I think that's just going to introduce a lot of excess notation. >> And, a translation from ObjectType to type name (e.g "ta

Re: [HACKERS] [RFC] Common object property boards

2011-07-29 Thread Tom Lane
Kohei Kaigai 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 i

[HACKERS] [RFC] Common object property boards

2011-07-29 Thread Kohei Kaigai
Robert Haas wrote: | I think that get_object_namespace() needs to be rethought. If you | take a look at AlterObjectNamespace() and its callers, you'll notice | that we already have, encoded in those call sites, the knowledge of | which object types can be looked up in which system caches, and whic