On 2013-09-28 14:11:29 +0300, Heikki Linnakangas wrote: > On 28.09.2013 12:44, David Rowley wrote: > >The macro for test 4 was as follows: > >#define appendStringInfoStringConst(buf, s) appendBinaryStringInfo(buf, > >(s), sizeof(s)-1) > > If that makes any difference in practice, I wonder if we should just do: > > #define appendStringInfoString(buf, s) appendBinaryStringInfo(buf, (s), > strlen(s))
Doesn't that have a bit too much of an multiple evaluation danger? Maybe make it a static inline in the header instead for the platforms that support it? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers