Jan de Visser <jan(at)de-visser(dot)net> writes:
> 4/ Question: Can I assume pg_malloc allocated memory is set to zero? If not,
> is it OK to do a memset(..., 0, ...)? I don't have much experience on any of
> the esoteric platforms pgsql supports...
No, you need the memset. You might accidentally get already-zeroed memory
from malloc, but it's not something you can rely on.
However, you could and should use pg_malloc0, which takes care of that
for you...
regards, tom lane