On Sat, Nov 14, 2026 at 10:34 AM Noah Misch <[email protected]> wrote: > > On Sat, Nov 14, 2026 at 11:25:18AM +0900, Michael Paquier wrote: > > reindexdb --schema has the idea of not quoting the schema given in > > input of the command line. For example, if a schema uses upper-case > > characters, the command could fail. Perhaps a fmtIdEnc() should be > > applied, in the same fashion as --tablespace? This point has come > > from Alvaro, during a recent review for a separate patch. > > > > Here is the suggested change: > > case REINDEX_SCHEMA: > > - appendPQExpBufferStr(sql, name); > > + appendPQExpBufferStr(sql, fmtIdEnc(name, > > PQclientEncoding(conn))); > > > > There may be a point in treating that as a bug, but that's also a > > backward-incompatible change so perhaps that could just be left as-is. > > The new quoting behavior feels upgraded to me, though, but perhaps I'm > > just biased. > > I think the change is mildly positive on balance. The rule would then be that > possibly-schema-qualified options like --table need interior quoting, but > single-name options don't. So a shell invocation would use > --table='"Embedded""QuoteNSP"."T"' but would use > --schema='Embedded"QuoteNSP'. I wouldn't back-patch it, though.
+1 for the change, master only. The one downside is that passing an already-quoted name like -S '"Foo"' stops working, but I think that's acceptable for master. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
