Show type in psql SELECT
От | Mike Toews |
---|---|
Тема | Show type in psql SELECT |
Дата | |
Msg-id | CAM2FmMr2XmOdU4ThhP7mR5v_UJhLPqDgAWB4c2TJpSw5P4idmw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: Show type in psql SELECT
Re: Show type in psql SELECT Re: Show type in psql SELECT |
Список | pgsql-hackers |
Hi hackers,
Type info can be viewed with "\d mytable", however often I'd like to see the type (and typmod) info in SELECT queries with psql, similar to pgAdmin III. For example:
my_db=# \pset type
my_db=# SELECT * FROM my_table;
gid | description | width
or in expanded form:
gid | description | width
integer | character varying(255) | numeric(6,3)
---------+------------------------+--------------
1 | Hello | 3.220
(1 row)
---------+------------------------+--------------
1 | Hello | 3.220
(1 row)
or in expanded form:
my_db=# \x
my_db=# SELECT * FROM my_table;
-[ RECORD 1 ]------
gid : integer | 1
description : character varying(255) | Hello
width : numeric(6,3) | 3.220
Has anyone else thought this was a missing feature?
-Mike
В списке pgsql-hackers по дате отправления: