On Fri, Sep 4, 2026 at 2:33 PM Ajin Cherian <[email protected]> wrote: > > On Wed, Sep 2, 2026 at 7:19 PM Peter Smith <[email protected]> wrote: > > > > I've also added more test cases for verified multiple schema/footers > > with a common \dn pattern. > > > > ~~~ > > > > PSA patch v4. > > Hello Peter, > > Thanks for the patch. I tested a few things and found a bug: > > postgres=# CREATE SCHEMA "MySchema"; > CREATE SCHEMA > postgres=# CREATE PUBLICATION pub_mixed FOR TABLES IN SCHEMA "MySchema"; > CREATE PUBLICATION > postgres=# \dn "MySchema" > Schema "MySchema" > Name | Owner > ------+------- > > The patch doesn't seem to work with certain quoted words. I don't > think you should be calling validateSQLNamePattern() and > processSQLNamePattern() from within describeOneSchemaDetails(). > validateSQLNamePattern and processSQLNamePattern() assume that you are > passing in patterns rather than actual schema names and then go on to > standardise the name (like lowercasing it), but by the time the code > is inside describeOneSchemaDetails(), you already have the actual > schema name. These functions then convert the actual schema name > MySchema to myschema but then don't find it in the database, which is > why it isn't shown in the describe output. >
Erk. Thankyou for finding that. I am surprised that patch v4 was able to pass existing regression tests with that bug. The \dn test cases must've had some gaps. I have added more tests for checking schema case in quoted names. PSA patch v5. Also, I changed the CF entry back to "Needs Review" in case there are more problems lurking. ====== Kind Regards, Peter Smith Fujitsu Australia.
v5-0001-Fix-escapes-for-psql-describe-schema-patterns.patch
Description: Binary data
