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