Looking at a pg_dump patch I realized that when we call buildIndexArray without having found objects to index, we still call pg_malloc with zero which in turn mallocs 1 byte. The byte in question is of course negligable, but it does seem cleaner to return early with NULL instead of returning an empty allocation which doesn't actually contain an index.
Any reason not to bail early as per the attached? cheers ./daniel
buildindexarrayalloc.patch
Description: Binary data