Thread: pgsql: Parenthesize macro arguments safely.

pgsql: Parenthesize macro arguments safely.

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Parenthesize macro arguments safely.  I see no bug among the current
uses of PG_DETOAST_DATUM_SLICE, but it's clearly trouble waiting to
happen.

Modified Files:
--------------
    pgsql/src/include:
        fmgr.h (r1.53 -> r1.54)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/fmgr.h?r1=1.53&r2=1.54)

Re: pgsql: Parenthesize macro arguments safely.

From
Gregory Stark
Date:
"Tom Lane" <tgl@postgresql.org> writes:

> Log Message:
> -----------
> Parenthesize macro arguments safely.  I see no bug among the current
> uses of PG_DETOAST_DATUM_SLICE, but it's clearly trouble waiting to
> happen.

If this is trouble waiting to happen it should probably be backported.
Otherwise a future bug fix could introduce a call to it and then be
backportted fix without anyone catching that the macro was defined
differently previously.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com