Bug #28124 data type list with a \ command in mysql client
Submitted: 26 Apr 2007 14:59 Modified: 5 Dec 2007 12:47
Reporter: Susanne Ebrecht Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S4 (Feature request)
Version:5.1BK OS:Any
Assigned to: CPU Architecture:Any
Tags: \T, select datatypes();, show datatypes;

[26 Apr 2007 14:59] Susanne Ebrecht
Description:
Hi All,

I didn't want to compare PostgreSQL with MySQL, but sometimes it's easier for me, to explain it that way.

I the psql client (CLI) from PostgreSQL you can say: \dT and you'll get a list of all possible data types with a short description. For example, how long is integer, how long is smallint, and so on.
Just a quick and short overview.
I often use this feature, and I knew, others also often use it. For example, if you are not sure, is there a data type for ipv4 addresses or is there a data type for money, how big is an integer and questions like this.
In mysql I missed it, because I wanted to look quickly, how many text datatypes mysql supports and how big they are.

Of course this features must not be a \ command. I just looked to my MySQL 5.1.17 and see, that there is not \T (T for types).

Maybe it would nicer in a show command, like show datatypes. Or just in a function.

Regards

Susanne

How to repeat:
it's a feature request ...
[26 Apr 2007 17:59] MySQL Verification Team
Thank you for the bug report. Verified on 5.1BK but I think it is a bug
(missed feature see below 5.0) not just a Documentation bug:

[miguel@light 5.0]$ bin/mysql -uroot -T
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.0.42-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select 1;
Field   1:  `1`
Catalog:    `def`
Database:   ``
Table:      ``
Org_table:  ``
Type:       LONGLONG
Collation:  binary (63)
Length:     1
Max_length: 1
Decimals:   0
Flags:      NOT_NULL BINARY NUM 

+---+
| 1 |
+---+
| 1 | 
+---+
1 row in set (0.00 sec)

mysql> exit
Bye

User time 0.00, System time 0.00
Maximum resident set size 0, Integral resident set size 0
Non-physical pagefaults 618, Physical pagefaults 0, Swaps 0
Blocks in 0 out 0, Messages in 0 out 0, Signals 0
Voluntary context switches 27, Involuntary context switches 4
Maximum memory usage: 52176 bytes (51k)
[miguel@light 5.0]$ bin/mysqladmin -uroot shutdown
skipped 9 bytes from file: socket (3)
[miguel@light 5.0]$ cd ..
[miguel@light dbs]$ cd 5.1
[miguel@light 5.1]$ bin/mysql -uroot -T
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.18-beta-debug Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select 1;
+---+
| 1 |
+---+
| 1 | 
+---+
1 row in set (0.00 sec)

mysql> 

Do you agree?
[1 May 2007 21:48] Sergei Golubchik
there's HELP COLUMN TYPES and (useless) SHOW COLUMN TYPES
[26 May 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".