Fix various memory leaks in psql's describe commands \d*
Most of these have been introduced in
d2d3547 with the new pattern
validation logic, and would leak memory worth an amount of one
PQExpBuffer each time (as of 256 bytes at minimum, possibly more).
Most of the patch has been written by Tang Haiying, with a few tweaks
coming from Γlvaro Herrera.
Reported-by: Tang Haiying
Author: Tang Haiying, Γlvaro Herrera
Reviewed-by: Mark Dilger, Andres Freund, Γlvaro Herrera, Tom Lane, Japin
Li, Michael Paquier, Junwang Zhao
Backpatch-through: 15