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 1k6pBI-0002Cv-RV for pgsql-general@arkaria.postgresql.org; Sat, 15 Aug 2020 05:56:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1k6pBG-0004Qc-Qd for pgsql-general@arkaria.postgresql.org; Sat, 15 Aug 2020 05:56:38 +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 1k6pBG-0004QV-It for pgsql-general@lists.postgresql.org; Sat, 15 Aug 2020 05:56:38 +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 1k6pBC-0002DY-LM for pgsql-general@postgresql.org; Sat, 15 Aug 2020 05:56:37 +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 07F5uWSF849648; Sat, 15 Aug 2020 01:56:33 -0400 From: Tom Lane To: "Aleksey M Boltenkov" cc: pgsql-general@postgresql.org Subject: Re: bug in psql? In-reply-to: <1597469729.11420.19912.20756@mail.rambler.ru> References: <1597469729.11420.19912.20756@mail.rambler.ru> Comments: In-reply-to "Aleksey M Boltenkov" message dated "Sat, 15 Aug 2020 08:35:29 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <849646.1597470992.1@sss.pgh.pa.us> Date: Sat, 15 Aug 2020 01:56:32 -0400 Message-ID: <849647.1597470992@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk "Aleksey M Boltenkov" writes: > Is this a bug? > pg01:5432 postgres@db=# select 'any expression'any expression\d+; No. The "\d+;" is taken as a backslash command, and is executed. The rest of what you typed is still waiting in the query buffer. It's bit weird perhaps, since \d seems like a "do-something" command rather than a query buffer editing command. But psql uses the same rules for both cases. regards, tom lane