Add fastpaths for when no objects are found

If there are no objects found, there is no reason to inspect the
result columns and mallocing a zero-sized  (which will be 1 byte
in reality) heap buffer for it.  Add a fast-path for immediately
returning like how other object inspection functions are already
doing it.

Reviewed-by: Ranier Vilela <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9c733951049bf3993c886d7f2c7459e7439a9793

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

Reply via email to