using column comment to store metadata

2007-09-17 Thread Ezequiel Panepucci
Hi, I'm thinking of using the COMMENT of columns when creating tables to store some metadata about the column, for instance: valid_range of numbers, validation regexp, etc. I did some tests with including this information as a JSON (JavaScript Object Notation) string which can then be easily

Re: using column comment to store metadata

2007-09-17 Thread Martijn Tonies
Hi, I'm thinking of using the COMMENT of columns when creating tables to store some metadata about the column, for instance: valid_range of numbers, validation regexp, etc. I did some tests with including this information as a JSON (JavaScript Object Notation) string which can then be

Re: using column comment to store metadata

2007-09-17 Thread Ezequiel Panepucci
On 9/17/07, Martijn Tonies [EMAIL PROTECTED] wrote: Do you have any comments about this approach? What could possibly go very bad about relying on this usage of the COMMENT? Yes, in different storage engines, different stuff is returned. For example, in InnoDB, what you get returned from

Re: using column comment to store metadata

2007-09-17 Thread Martijn Tonies
Do you have any comments about this approach? What could possibly go very bad about relying on this usage of the COMMENT? Yes, in different storage engines, different stuff is returned. For example, in InnoDB, what you get returned from SHOW FULL COLUMNS is not what you stored

Re: using column comment to store metadata

2007-09-17 Thread Ezequiel Panepucci
I currently use MyISAM, but I just tried a simple create(InnoDB)/show full columns from/ and it actually does return the JSON strings I put in. Try it on columns with a foreign key constraint. I did and it still works (maybe the behaviour is version dependent?). Here is what I did:

Re: using column comment to store metadata

2007-09-17 Thread Martijn Tonies
I currently use MyISAM, but I just tried a simple create(InnoDB)/show full columns from/ and it actually does return the JSON strings I put in. Try it on columns with a foreign key constraint. I did and it still works (maybe the behaviour is version dependent?). Hmm, could be.

Re: revoke SELECT on a column [ MySQL 4.1 ] + column Comment

2007-02-09 Thread ViSolve DB Team
@lists.mysql.com Sent: Friday, February 09, 2007 6:54 AM Subject: Re: revoke SELECT on a column [ MySQL 4.1 ] + column Comment Hello, thanks again to ViSolve DB Team. so, it turns out that for MySQL4.1, il will have to built a sql file, built with script (shell or perl). [ note that so far I use MySQL

Re: revoke SELECT on a column [ MySQL 4.1 ] + column Comment

2007-02-08 Thread Gilles MISSONNIER
QUESTION concerns column Comment In MySQL 5, I can do : mysql select column_name,COLUMN_COMMENT from information_schema.columns where table_schema=a_base and table_name='a_tab'; in MySQL 4.1 , the equivalent would be : mysql select distinct Column_name from columns_priv where Db

Column comment

2003-03-19 Thread Ruvinskiy, Ray
Hi, I am aware of the fact that with 4.1.0, you can specify comments on a column by column by basis. I was wondering if this functionality could somehow be simulated in 4.0.x? It is high priority for me, but I cannot deploy the alpha stage 4.1.0 in a production environment. Basically, what I

Re: Column comment / metadata tables

2003-03-19 Thread Stephen Brownlow
Basically, what I would like to do is associate a human readable label with each column (in the comment field) so that I can automatically generate web-based forms for any given table. The script would look at the column's metadata, display the appropriate HTML element, and display the