Here, I introduce the way to show values vertically which are retrieved by SELECT
SQL in PostgreSQL.
Environment
- PostgreSQL 9.3
How to do
Execute \x
command, then the column values are shown vertically, which is retrieved by SELECT
query.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
=> \x => select * from users limit 1; -[ RECORD 1 ]----------------------+------------------------------------------------------------- id | 1142 login | login_code name | Taro email | taro@taro.com encrypted_password | $2a$10$TeCGAIfFYIZeARvvSByli.HcihGMiD9AhagF4RvPMwlUOYxl6Nhr6 remember_token | remember_created_at | created_at | 2017-11-28 15:56:17.30237 updated_at | 2018-02-11 17:30:29.429387 authentication_token | pDLRszpnnHFq9+ceGSp4Gs8kNA7LEkviaVMH/8iXg3w= |
\x
command
\?
command shows the description of \x
command. It is explained as toggle expanded output
. Showing vertically is represented as Expand output.