public inbox for [email protected]  
help / color / mirror / Atom feed
From: Pavel Luzanov <[email protected]>
To: Marc Millas <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: psql meta command
Date: Thu, 10 Apr 2025 22:03:19 +0300
Message-ID: <[email protected]> (raw)
In-Reply-To: <CADX_1aZOLCixPFOH3f_QXpopQg6LhmG8aVhhik7Fg=3SnLKa4Q@mail.gmail.com>
References: <CADX_1aZOLCixPFOH3f_QXpopQg6LhmG8aVhhik7Fg=3SnLKa4Q@mail.gmail.com>

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


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: psql meta command
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox