Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Tom Lane
Andres Freund writes: > On Tuesday, October 09, 2012 12:56:16 AM Tom Lane wrote: >> Andres Freund writes: >>> The 'val' parameter is ignored. >> This is not broken. Read the comments for MemSetTest. > Ah. I was surprised about that already. The comment says that val has to be > constant thoug

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Andres Freund
On Tuesday, October 09, 2012 12:56:16 AM Tom Lane wrote: > Andres Freund writes: > > The 'val' parameter is ignored. > > This is not broken. Read the comments for MemSetTest. Ah. I was surprised about that already. The comment says that val has to be constant though, not that it has to be zero.

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Tom Lane
Andres Freund writes: > The 'val' parameter is ignored. This is not broken. Read the comments for MemSetTest. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpr

Re: [HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Andres Freund
On Monday, October 08, 2012 10:39:27 PM Andres Freund wrote: > The 'val' parameter is ignored. Trivial patch attached. -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From a4056e1110961c64b56d61a88c0d472c58a80579 Mon Sep

[HACKERS] MemSetLoop ignoring the 'val' parameter

2012-10-08 Thread Andres Freund
Hi, #define MemSetLoop(start, val, len) \ do \ { \ long * _start = (long *) (start); \ long * _stop = (long *) ((char *) _start + (Size) (len)); \ \ while (_start < _stop) \ *_start++ = 0; \ } w