Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2xBR-008Fv3-SP for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 19:03:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1u2xBQ-00GMy7-77 for pgsql-general@arkaria.postgresql.org; Thu, 10 Apr 2025 19:03:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1u2xBP-00GMxz-NZ for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 19:03:28 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1u2xBM-0046nh-1Y for pgsql-general@lists.postgresql.org; Thu, 10 Apr 2025 19:03:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1744311800; bh=XJYwFqHkjhSbAfTi1t28TCHhI+sfITdOb+324FI2WhU=; h=Message-ID:Date:User-Agent:Subject:To:References:From:In-Reply-To: From; b=yEYSU1vDkfVlJ57RSo4igRrir0n3rqJPmeFeirH42wA757OqK7g8HCOkTjijv4Csh 3yMa0uaYbKaGRfkKrd98VK/bUuHxKORByYCP78rVe689v+2angu8usCfXNJ5FLcPR5 JAaT0CeB9M1qGbcaKf/tM6Mlg/t4lGniKST15JE4Jn0WKk9YnBu+HPIdCgNGtQbdTB VoTukBUnFAK61brnuJNRH6ugSD4be1/DBNeY0LCXHCqD3XePCy4WshFE8ELGu8Z/18 vUMuPBoQGY4eN82RLLzzT0PKo0afQuzZwCFfshj7LDnCAZz5bdbEsF9ElAFDDUY3si OafcxS5iR2pEg== Received: from [192.168.0.104] (unknown [62.217.184.234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: p.luzanov@postgrespro.ru) by mail.postgrespro.ru (Postfix/587) with ESMTPSA id BCA746038B; Thu, 10 Apr 2025 22:03:20 +0300 (MSK) Content-Type: multipart/alternative; boundary="------------zh3Ql0Ck3ZG6ZqeI0jbTJBOq" Message-ID: <2bb947f2-fb20-4c9b-b71b-db2eab372f96@postgrespro.ru> Date: Thu, 10 Apr 2025 22:03:19 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: psql meta command To: Marc Millas , "pgsql-general@lists.postgresql.org" References: Content-Language: en-US, ru-RU From: Pavel Luzanov In-Reply-To: X-KSMG-AntiPhishing: NotDetected, bases: 2025/04/10 18:03:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/04/10 14:45:00 #27872190 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------zh3Ql0Ck3ZG6ZqeI0jbTJBOq Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10.04.2025 15:29, Marc Millas wrote: > on a customer postgres db, using psql, if I post \  to initiate, for > exemple \x > that psql immediately exits. > somewhat boring as it blocks all psql meta commands. > Is there a way to get the extended display without posting a \  ? You can enable extended output when starting psql: $ psql -x -c 'select 1,2,3' -[ RECORD 1 ] ?column? | 1 ?column? | 2 ?column? | 3 Also, not sure but you can try hide \ in psql variable: $ psql --set expanded_mode='\x' psql (18devel) Type "help" for help. postgres@demo(18.0)=# :expanded_mode Expanded display is on. postgres@demo(18.0)=# select 1,2,3; -[ RECORD 1 ] ?column? | 1 ?column? | 2 ?column? | 3 -- Pavel Luzanov Postgres Professional:https://postgrespro.com --------------zh3Ql0Ck3ZG6ZqeI0jbTJBOq Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 10.04.2025 15:29, Marc Millas wrote:
on a customer postgres db, using psql, if I post \  to initiate, for exemple \x
that psql immediately exits.
somewhat boring as it blocks all psql meta commands.
Is there a way to get the extended display without posting a \  ?

You can enable extended output when starting psql:
$ psql -x -c 'select 1,2,3'
-[ RECORD 1 ]
?column? | 1
?column? | 2
?column? | 3

Also, not sure but you can try hide \ in psql variable:

$ psql --set expanded_mode='\x'
psql (18devel)
Type "help" for help.

postgres@demo(18.0)=# :expanded_mode
Expanded display is on.
postgres@demo(18.0)=# select 1,2,3;
-[ RECORD 1 ]
?column? | 1
?column? | 2
?column? | 3

-- 
Pavel Luzanov
Postgres Professional: https://postgrespro.com
--------------zh3Ql0Ck3ZG6ZqeI0jbTJBOq--