Martijn van Oosterhout wrote:
> On Wed, Jan 14, 2009 at 09:52:20AM -0500, Tom Lane wrote:
>> Martijn van Oosterhout writes:
>>> On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
pgace.h: you have a bunch of "static inline" functions in here. As far
as I know this doesn't w
On Wed, Jan 14, 2009 at 09:52:20AM -0500, Tom Lane wrote:
> Martijn van Oosterhout writes:
> > On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
> >> pgace.h: you have a bunch of "static inline" functions in here. As far
> >> as I know this doesn't work in compilers other than GCC :
> It's not in C89 but look up "alloca".
I know about alloca...
> We don't use it anywhere in postgres currently so it's kind of unlikely we
> would start now.
:-(
>> 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 is
"Robert Haas" writes:
> 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 */
> }
It's not in C89 but look up "alloca".
We don't use it anywhere in postgres currently so it's kind of
On Wed, Jan 14, 2009 at 10:00 AM, Tom Lane wrote:
> Bruce Momjian 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
Tom Lane wrote:
> If you ran the current sepostgres patch through an actual C99 compiler,
> it would fail.
The current one (r1408) is reworked to use normal functions, and inlines
are eliminated. :-)
http://code.google.com/p/sepgsql/source/browse/trunk/sepgsql/src/include/security/sepgsql.h
Bruce Momjian 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
Martijn van Oosterhout writes:
> On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
>> pgace.h: you have a bunch of "static inline" functions in here. As far
>> as I know this doesn't work in compilers other than GCC :-(
> Really? C99 requires it and MSVC does support it.
Wrong. W
KaiGai Kohei wrote:
> Martijn van Oosterhout wrote:
> > On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
> >> pgace.h: you have a bunch of "static inline" functions in here. As far
> >> as I know this doesn't work in compilers other than GCC :-( See
> >> pg_list.h (list_head) for a
Martijn van Oosterhout wrote:
> On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
> > pgace.h: you have a bunch of "static inline" functions in here. As far
> > as I know this doesn't work in compilers other than GCC :-( See
> > pg_list.h (list_head) for an example. I think we can
Martijn van Oosterhout wrote:
> On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
>> pgace.h: you have a bunch of "static inline" functions in here. As far
>> as I know this doesn't work in compilers other than GCC :-( See
>> pg_list.h (list_head) for an example. I think we can tol
On Tue, Jan 13, 2009 at 10:05:45AM -0300, Alvaro Herrera wrote:
> pgace.h: you have a bunch of "static inline" functions in here. As far
> as I know this doesn't work in compilers other than GCC :-( See
> pg_list.h (list_head) for an example. I think we can tolerate this for
> the three function
Alvaro Herrera wrote:
KaiGai Kohei wrote:
I updated patch set of SE-PostgreSQL and related stuff (r1403).
[1/5]
http://sepgsql.googlecode.com/files/sepostgresql-sepgsql-8.4devel-3-r1403.patch
Random observations:
Thanks for your comment!
heapam.c: you've got a bunch of elog(ERROR) calls
KaiGai Kohei wrote:
> I updated patch set of SE-PostgreSQL and related stuff (r1403).
>
> [1/5]
> http://sepgsql.googlecode.com/files/sepostgresql-sepgsql-8.4devel-3-r1403.patch
Random observations:
heapam.c: you've got a bunch of elog(ERROR) calls in there that should
be ereport(ERROR), and sh
14 matches
Mail list logo