Re: Updates of SE-PostgreSQL 8.4devel patches (r1403)
От | Robert Haas |
---|---|
Тема | Re: Updates of SE-PostgreSQL 8.4devel patches (r1403) |
Дата | |
Msg-id | 603c8f070901140715k4aa7f517ja4fc8acc876ae7dc@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Updates of SE-PostgreSQL 8.4devel patches (r1403) (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Updates of SE-PostgreSQL 8.4devel patches (r1403)
|
Список | pgsql-hackers |
On Wed, Jan 14, 2009 at 10:00 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Bruce Momjian <bruce@momjian.us> writes: >> KaiGai Kohei wrote: >>> However, it also seems to me that PostgreSQL implementation tend to >>> avoid to use inline functions actively. > >> I thought one advantage of using macros is that we force the inlining, > > The (only) good thing about macros is they're portable: they work, > and work the same, on every C compiler. This cannot be said of "inline". Just out of curiosity, does C89, or whatever standard we follow, allow this? int somefunc(int x) { int foo[x]; /* use foo[] for scratch space */ } Obviously this is a bad plan if x can be a big number because you might crash your stack, but suppose we know that's not an issue? It seems a shame to have to do palloc/pfree in a situation like this. ...Robert
В списке pgsql-hackers по дате отправления: