doc: pg_restore --filter refers to nonexistent --indexes option

Started by Taras Kloba28 days ago2 messageshackers
Jump to latest
#1Taras Kloba
taras.kloba@gmail.com

Hi hackers,

In the pg_restore reference page, the description of the "index"
keyword for --filter says that it "works like the -I/--indexes
option", but the long option is --index:

$ pg_restore --indexes=t_a_idx -f - v.dump
pg_restore: unrecognized option '--indexes=t_a_idx'

$ pg_restore --index=t_a_idx -f - v.dump
CREATE INDEX t_a_idx ON public.t USING btree (a);

A filter file containing "include index t_a_idx" gives the same result
as --index, as intended. The attached one-line patch fixes the option
name.

The mistake dates from commit a5cf808be55, which added --filter in
v17, so the patch could be back-patched to 17. It applies cleanly to
REL_18_STABLE and REL_19_STABLE; on REL_17_STABLE the option list is
ordered differently, so a cherry-pick conflicts, but "git am" works.
I also have a version made against REL_17_STABLE if that's easier.

Regards,
Taras Kloba

Attachments:

t254400_1
v1-0001-doc-Fix-option-name-in-pg_restore-s-filter-descri.patchapplication/octet-stream; name=v1-0001-doc-Fix-option-name-in-pg_restore-s-filter-descri.patchDownload+1-3
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Taras Kloba (#1)
Re: doc: pg_restore --filter refers to nonexistent --indexes option

On 26 Oct 2026, at 18:53, Taras Kloba <taras.kloba@gmail.com> wrote:

In the pg_restore reference page, the description of the "index"
keyword for --filter says that it "works like the -I/--indexes
option", but the long option is --index:

Thanks for the report and patch, pushed and backpatched through 17.

--
Daniel Gustafsson