postgresql/contrib
Amit Langote 059cf7f58d Fix pg_overexplain to emit valid output with RANGE_TABLE option.
overexplain_range_table() emitted the "Unprunable RTIs" and "Result
RTIs" properties before closing the "Range Table" group.  In the JSON
and YAML formats the Range Table group is rendered as an array of RTE
objects, so emitting key/value pairs inside it produced structurally
invalid output.  The XML format had a related oddity, with these
elements nested inside <Range-Table> rather than appearing as its
siblings.

These fields are properties of the PlannedStmt as a whole, not of any
individual RTE, so close the Range Table group before emitting them.
They now appear as siblings of "Range Table" in the parent Query
object, which is what was intended.

Also add a test exercising FORMAT JSON with RANGE_TABLE so that any
future regression in the output structure is caught.

Reported-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Author: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Reviewed-by: Amit Langote <amitlangote09@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAHg+QDdDrdqMr98a_OBYDYmK3RaT7XwCEShZfvDYKZpZTfOEjQ@mail.gmail.com
Backpatch-through: 18
2026-04-16 13:47:07 +09:00
..
amcheck Use UnlockReleaseBuffer() in more places 2026-03-27 15:56:29 -04:00
auth_delay
auto_explain instrumentation: Allocate query level instrumentation in ExecutorStart 2026-04-08 00:06:45 -04:00
basebackup_to_shell
basic_archive Fix dereference in a couple of GUC check hooks 2026-03-24 16:45:39 +01:00
bloom Discount the metapage when estimating number of index pages visited. 2026-03-20 14:50:53 -04:00
bool_plperl
btree_gin
btree_gist
citext
cube
dblink Avoid including vacuum.h in tableam.h and heapam.h. 2026-03-31 12:43:52 -05:00
dict_int
dict_xsyn
earthdistance
file_fdw file_fdw: Add regression test for file_fdw with ON_ERROR='set_null' 2026-03-16 12:13:11 +09:00
fuzzystrmatch
hstore Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
hstore_plperl
hstore_plpython
intagg
intarray
isn
jsonb_plperl
jsonb_plpython
lo
ltree
ltree_plpython
oid2name
pageinspect Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
passwordcheck
pg_buffercache Modernize and optimize pg_buffercache_pages() 2026-04-07 16:04:48 +03:00
pg_freespacemap
pg_logicalinspect
pg_overexplain Fix pg_overexplain to emit valid output with RANGE_TABLE option. 2026-04-16 13:47:07 +09:00
pg_plan_advice pg_plan_advice: Export feedback-related definitions. 2026-04-13 11:47:40 -04:00
pg_prewarm Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
pg_stash_advice pg_stash_advice: Allow stashed advice to be persisted to disk. 2026-04-07 10:11:36 -04:00
pg_stat_statements instrumentation: Allocate query level instrumentation in ExecutorStart 2026-04-08 00:06:45 -04:00
pg_surgery
pg_trgm Optimize sorting and deduplicating trigrams 2026-04-07 14:11:25 +03:00
pg_visibility Allow logical replication snapshots to be database-specific 2026-04-07 12:31:18 +02:00
pg_walinspect Report detailed errors from XLogFindNextRecord() failures. 2026-03-24 22:33:09 +09:00
pgcrypto Add missing period to HINT messages. 2026-04-14 09:37:18 +05:30
pgrowlocks Thread flags through begin-scan APIs 2026-03-30 12:27:24 -04:00
pgstattuple pgstattuple: Optimize pgstattuple_approx() with streaming read 2026-03-14 15:06:13 +09:00
postgres_fdw Add support for importing statistics from remote servers. 2026-04-08 19:15:00 +09:00
seg psql: Make \d+ partition list formatting consistent with other objects 2026-03-30 11:06:42 +09:00
sepgsql
spi
sslinfo
start-scripts
tablefunc Avoid including vacuum.h in tableam.h and heapam.h. 2026-03-31 12:43:52 -05:00
tcn
test_decoding Add UPDATE/DELETE FOR PORTION OF 2026-04-01 19:06:03 +02:00
tsm_system_rows
tsm_system_time Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
unaccent Update Unicode data to Unicode 17.0.0 2026-03-20 08:42:50 +01:00
uuid-ossp
vacuumlo
xml2 Reduce header inclusions via execnodes.h 2026-03-16 14:34:57 +01:00
contrib-global.mk
Makefile Add pg_stash_advice contrib module. 2026-04-06 07:41:28 -04:00
meson.build Add pg_stash_advice contrib module. 2026-04-06 07:41:28 -04:00
README

The PostgreSQL contrib tree
---------------------------

This subtree contains porting tools, analysis utilities, and plug-in
features that are not part of the core PostgreSQL system, mainly
because they address a limited audience or are too experimental to be
part of the main source tree.  This does not preclude their
usefulness.

User documentation for each module appears in the main SGML
documentation.

When building from the source distribution, these modules are not
built automatically, unless you build the "world" target.  You can
also build and install them all by running "make all" and "make
install" in this directory; or to build and install just one selected
module, do the same in that module's subdirectory.

Some directories supply new user-defined functions, operators, or
types.  To make use of one of these modules, after you have installed
the code you need to register the new SQL objects in the database
system by executing a CREATE EXTENSION command.  In a fresh database,
you can simply do

    CREATE EXTENSION module_name;

See the PostgreSQL documentation for more information about this
procedure.