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

From Tom Lane
Subject Re: [RFC] Common object property boards
Date
Msg-id 22555.1312732954@sss.pgh.pa.us
Whole thread Raw
In response to Re: [RFC] Common object property boards  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Responses Re: [RFC] Common object property boards
List pgsql-hackers
Kohei KaiGai <kaigai@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 get_object_property_attnum_name(objtype)                        \
>     ({  AttrNumber ____temp;                                            \
>         get_object_property((objtype), NULL, NULL, NULL, NULL,          \
>                             &____temp, NULL, NULL);                     \
>         ____temp; })

Blocks within expressions are a gcc-ism and will fail on any other
compiler, so you can't do it that way.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Wojciech Muła
Date:
Subject: [PL/pgSQL] %TYPE and array declaration
Next
From: Tom Lane
Date:
Subject: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs