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 1nAyye-00064h-M0 for pgsql-general@arkaria.postgresql.org; Fri, 21 Jan 2022 18:49:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nAyyd-0006JS-Gg for pgsql-general@arkaria.postgresql.org; Fri, 21 Jan 2022 18:49:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAyyd-0006JJ-66 for pgsql-general@lists.postgresql.org; Fri, 21 Jan 2022 18:49:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAyya-0002vs-MP for pgsql-general@postgresql.org; Fri, 21 Jan 2022 18:49:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 20LInU0G1202446; Fri, 21 Jan 2022 13:49:30 -0500 From: Tom Lane To: Adrian Klaver cc: pgsql-general Subject: Re: psql and Postgres 7.2 In-reply-to: References: Comments: In-reply-to Adrian Klaver message dated "Fri, 21 Jan 2022 10:35:59 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1202444.1642790970.1@sss.pgh.pa.us> Date: Fri, 21 Jan 2022 13:49:30 -0500 Message-ID: <1202445.1642790970@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Adrian Klaver writes: > src/bin/psql/command.c > /* > * Ideally we should treat the arguments as SQL identifiers. But for > * backwards compatibility with 7.2 and older pg_dump files, we have to > * take unquoted arguments verbatim (don't downcase them). For now, > * double-quoted arguments may be stripped of double quotes (as if SQL > * identifiers). By 7.4 or so, pg_dump files can be expected to > * double-quote all mixed-case \connect arguments, and then we can get rid > * of OT_SQLIDHACK. > */ > Since Postgres 14 pg_dump only goes back to 8.0 and the \d commands in > psql go back to 7.4, is this something that needs to hang on? Yeah, I was wondering about that the other day. I agree that we probably don't need to worry anymore about reading 7.2 pg_dump output. However, people may be used to/depending on the current behavior in other ways. It's hard to be sure, but it is worth noting that it's been a long time since \connect arguments were only identifiers. We'd have to consider the impact on the connstring case, too. regards, tom lane