postgresql/src
Tom Lane 4e784f3514 Fix infelicities in describeOneTableDetails' partitioned-table handling.
describeOneTableDetails issued a partition-constraint-fetching query
for every table, even ones it knows perfectly well are not partitions.

To add insult to injury, it then proceeded to leak the empty PGresult
if the table wasn't a partition.  Doing that a lot of times might
amount to a meaningful leak, so this seems like a back-patchable bug.

Fix that, and also fix a related PGresult leak in the partition-parent
case (though that leak would occur only if we got no row, which is
unexpected).

Minor code beautification too, to make this code look more like the
pre-existing code around it.

Back-patch the whole change into v12.  However, the fact that we already
know whether the table is a partition dates only to commit 1af25ca0c;
back-patching the relevant changes from that is probably more churn
than is justified in released branches.  Hence, in v11 and v10, just
do the minimum to fix the PGresult leaks.

Noted while messing around with adjacent code for yesterday's \d
improvements.
2019-07-24 18:14:43 -04:00
..
backend Use full 64-bit XID for checking if a deleted GiST page is old enough. 2019-07-24 20:24:07 +03:00
bin Fix infelicities in describeOneTableDetails' partitioned-table handling. 2019-07-24 18:14:43 -04:00
common Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
fe_utils Use appendStringInfoString and appendPQExpBufferStr where possible 2019-07-04 13:01:13 +12:00
include Use full 64-bit XID for checking if a deleted GiST page is old enough. 2019-07-24 20:24:07 +03:00
interfaces Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
makefiles Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
pl Fix inconsistencies and typos in the tree 2019-07-22 10:01:50 +09:00
port Fix inconsistencies and typos in the tree 2019-07-16 13:23:53 +09:00
template Yet further rethinking of build changes for macOS Mojave. 2018-11-02 18:54:00 -04:00
test Improve stability of TAP test for synchronous replication 2019-07-24 10:53:39 +09:00
timezone Silence compiler warning, hopefully. 2019-07-19 14:48:57 -04:00
tools Fix some inconsistencies in MSVC scripts 2019-07-13 16:51:31 +09:00
tutorial Phase 2 pgindent run for v12. 2019-05-22 13:04:48 -04:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
Makefile.shlib Remove support for non-ELF BSD systems 2019-07-01 23:56:20 +01:00
nls-global.mk Move logging.h and logging.c from src/fe_utils/ to src/common/. 2019-05-14 14:20:10 -04:00