Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nht8S-0005yo-4R for pgsql-committers@arkaria.postgresql.org; Fri, 22 Apr 2022 13:15:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nht8R-00081c-14 for pgsql-committers@arkaria.postgresql.org; Fri, 22 Apr 2022 13:15:43 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nht8Q-00081T-QE for pgsql-committers@lists.postgresql.org; Fri, 22 Apr 2022 13:15:42 +0000 Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nht8J-0000C4-Q7 for pgsql-committers@lists.postgresql.org; Fri, 22 Apr 2022 13:15:42 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id C478EE0005; Fri, 22 Apr 2022 13:15:33 +0000 (UTC) Message-ID: <3a190754-b2b0-d02b-dcfd-4ec1610ffbcb@dunslane.net> Date: Fri, 22 Apr 2022 09:15:31 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: pgsql: Allow db.schema.table patterns, but complain about random garbag Content-Language: en-US To: Robert Haas , pgsql-committers@lists.postgresql.org References: From: Andrew Dunstan In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-04-20 We 11:52, Robert Haas wrote: > Allow db.schema.table patterns, but complain about random garbage. > > psql, pg_dump, and pg_amcheck share code to process object name > patterns like 'foo*.bar*' to match all tables with names starting in > 'bar' that are in schemas starting with 'foo'. Before v14, any number > of extra name parts were silently ignored, so a command line '\d > foo.bar.baz.bletch.quux' was interpreted as '\d bletch.quux'. In v14, > as a result of commit 2c8726c4b0a496608919d1f78a5abc8c9b6e0868, we > instead treated this as a request for table quux in a schema named > 'foo.bar.baz.bletch'. That caused problems for people like Justin > Pryzby who were accustomed to copying strings of the form > db.schema.table from messages generated by PostgreSQL itself and using > them as arguments to \d. > > Accordingly, revise things so that if an object name pattern contains > more parts than we're expecting, we throw an error, unless there's > exactly one extra part and it matches the current database name. > That way, thisdb.myschema.mytable is accepted as meaning just > myschema.mytable, but otherdb.myschema.mytable is an error, and so > is some.random.garbage.myschema.mytable. This has upset the buildfarm's msys2 animals. There appears to be some wildcard expansion going on that causes the problem. I don't know why it should here when it's not causing trouble elsewhere. I have tried changing the way the tests are quoted, without success. Likewise, setting SHELLOPTS=noglob didn't work. At this stage I'm fresh out of ideas to fix it. It's also quite possible that my diagnosis is wrong. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com