postgresql/contrib/pgstattuple
Michael Paquier 8b9b93e39b Use relation_close() more consistently in contrib/
All the code paths updated here have been using index_close() to
close a relation that was opened with relation_open(), in pgstattuple
and pageinspect.  index_close() does the same thing as relation_close(),
so there is no harm, but being inconsistent could lead to issues if the
internals of these close() functions begin to introduce some specific
logic in the future.

In passing, this commit adds some comments explaining why we are using
relation_open() instead of index_open() in a few places, which is due to
the fact that partitioned indexes are not allowed in these functions.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Japin Li <japinli@hotmail.com>
Discussion: https://postgr.es/m/aUKamYGiDKO6byp5@ip-10-97-1-34.eu-west-3.compute.internal
2026-01-06 16:17:59 +09:00
..
expected Reintroduce support for sequences in pgstattuple and pageinspect. 2024-09-12 16:31:29 -05:00
sql Reintroduce support for sequences in pgstattuple and pageinspect. 2024-09-12 16:31:29 -05:00
.gitignore Add a regression test for pgstattuple. 2011-08-25 00:06:16 -04:00
Makefile Remove support for upgrading extensions from "unpackaged" state. 2020-02-19 16:59:14 -05:00
meson.build Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgstatapprox.c Update copyright for 2026 2026-01-01 13:24:10 -05:00
pgstatindex.c Use relation_close() more consistently in contrib/ 2026-01-06 16:17:59 +09:00
pgstattuple--1.0--1.1.sql Add pgstatginindex() function to get the size of the GIN pending list. 2012-12-05 09:58:03 +02:00
pgstattuple--1.1--1.2.sql Fix pgstattuple functions to use regclass-type as the argument. 2013-07-19 03:50:20 +09:00
pgstattuple--1.2--1.3.sql Add pgstattuple_approx() to the pgstattuple extension. 2015-05-13 07:35:06 +02:00
pgstattuple--1.3--1.4.sql Update pgstattuple extension for parallel query. 2016-06-10 10:42:03 -04:00
pgstattuple--1.4--1.5.sql Fix pgstattuple's handling of unused hash pages. 2017-04-12 11:53:00 -04:00
pgstattuple--1.4.sql Minor fixes in contrib installation scripts. 2016-06-14 10:47:06 -04:00
pgstattuple.c pgstattuple: Improve reports generated for indexes (hash, gist, btree) 2025-10-02 11:07:30 +09:00
pgstattuple.control Remove superuser checks in pgstattuple 2016-09-29 22:13:38 -04:00