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

2011-08-08 Thread Kohei KaiGai
2011/8/7 Tom Lane t...@sss.pgh.pa.us: Kohei KaiGai kai...@kaigai.gr.jp 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

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 Robert Haas
On Mon, Aug 8, 2011 at 11:57 AM, Alvaro Herrera alvhe...@commandprompt.com 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

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 12:22 PM, Alvaro Herrera alvhe...@commandprompt.com 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

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 robertmh...@gmail.com: 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

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

2011-08-08 Thread Kohei KaiGai
2011/8/8 Robert Haas robertmh...@gmail.com: On Mon, Aug 8, 2011 at 11:57 AM, Alvaro Herrera alvhe...@commandprompt.com 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

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 alvhe...@commandprompt.com 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

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

2011-08-08 Thread Tom Lane
Robert Haas robertmh...@gmail.com 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

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

2011-08-08 Thread Robert Haas
On Mon, Aug 8, 2011 at 1:16 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com 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

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

2011-08-08 Thread Robert Haas
On Mon, Aug 8, 2011 at 12:49 PM, Alvaro Herrera alvhe...@commandprompt.com 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 alvhe...@commandprompt.com wrote: Excerpts from Robert Haas's message of lun ago 08 12:05:05

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 whether it

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

2011-08-07 Thread Tom Lane
Kohei KaiGai kai...@kaigai.gr.jp 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

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

2011-08-02 Thread Kohei KaiGai
2011/8/2 Robert Haas robertmh...@gmail.com: On Mon, Aug 1, 2011 at 4:27 PM, Alvaro Herrera alvhe...@commandprompt.com 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 alvhe...@commandprompt.com wrote: Excerpts from

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 t...@sss.pgh.pa.us: 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

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

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

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 alvhe...@commandprompt.com wrote: Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011: 2011/7/29 Tom Lane t...@sss.pgh.pa.us: It would likely be

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

2011-08-01 Thread Robert Haas
On Mon, Aug 1, 2011 at 4:27 PM, Alvaro Herrera alvhe...@commandprompt.com 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 alvhe...@commandprompt.com wrote: Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55

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

2011-07-31 Thread Kohei KaiGai
2011/7/29 Tom Lane t...@sss.pgh.pa.us: Kohei Kaigai kohei.kai...@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

[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

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

2011-07-29 Thread Tom Lane
Kohei Kaigai kohei.kai...@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?

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

2011-07-29 Thread Robert Haas
On Fri, Jul 29, 2011 at 1:49 PM, Tom Lane t...@sss.pgh.pa.us 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