• Tom Lane's avatar
    Change inv_truncate() to not repeat its systable_getnext_ordered() scan. · 7ab6f2da
    Tom Lane authored
    In the case where the initial call of systable_getnext_ordered() returned
    NULL, this function would nonetheless call it again.  That's undefined
    behavior that only by chance failed to not give visibly incorrect results.
    Put an if-test around the final loop to prevent that, and in passing
    improve some comments.  No back-patch since there's no actual failure.
    
    Per report from YAMAMOTO Takashi.
    7ab6f2da
inv_api.c 22.9 KB