From: Ken Bloom Date: 2007-08-20T02:09:58+09:00 Subject: Re: Getting MySQL column comment metadata? On Sun, 19 Aug 2007 23:33:35 +0900, Mario T. Lanza wrote: > Hi All, > > How do I go about getting the "Comments" metadata--the one I type via > MySQL Administrator, for example--associated with a MySQL column? > > I have been able to pull metadata from both ActiveRecord and DBI but > cannot seem to find this added bit of info. This doesn't appear to be implemented directily in MySQL's C API. Certainly it's not implemented in the direct MySQL Ruby API (see http:// www.tmtm.org/en/mysql/ruby/ and have a look at fetch_fields and the Mysql::Field class). Since DBD::Myql uses fetch_fields to determine what metadata is available, it's not available in dbi. I don't know about ActiveRecord, but I would expect the same thing. The only way I know of to get this information is by running a "show full columns from TABLENAME" or using INFORMATION_SCHEMA. (Well, there's "show create table" too, but that requires parsing -- why use that when you have "show full columns") --Ken -- Ken Bloom. PhD candidate. Linguistic Cognition Laboratory. Department of Computer Science. Illinois Institute of Technology. http://www.iit.edu/~kbloom1/