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

From: Taras Kloba <taras(dot)kloba(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: doc: pg_restore --filter refers to nonexistent --indexes option
Date: 2026-10-26 17:53:56
Message-ID: CAODqpgofaVQBZ73rmPoj83Y1-6gbGhLiBKHD=82b1wiNkoF-AQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-doc-Fix-option-name-in-pg_restore-s-filter-descri.patch application/octet-stream 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Burd 2026-10-26 18:02:36 Re: Let's drop support for named POSIX semaphores
Previous Message Manu 2026-10-26 17:40:53 Re: pgsql: Don't trust NOT NULL on virtual generated columns of partitioned