Bug #27041 generalise column names in SELECT glob*name
Submitted: 12 Mar 2007 9:11 Modified: 4 Feb 2009 15:15
Reporter: Hans Ginzel Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Parser Severity:S4 (Feature request)
Version:5.0.26-community-nt, 5.1 OS:Microsoft Windows (MS Windows XP)
Assigned to: CPU Architecture:Any
Tags: columns, glob, like, SELECT
Triage: Needs Triage: D5 (Feature request)

[12 Mar 2007 9:11] Hans Ginzel
Description:
Generalise column names in SELECT clausule to glob names:
SELECT glob*name

How to repeat:
CREATE TBALE test (
   id int,
   desc varchar(255),
   d1 date,
   ...,
   d100 date,
   col1 int,
   ...,
   col100 int
)

SELECT col*
FROM test;

Suggested fix:
parse column names in select clausule as glob names:
select name
select begin*
select col[1-9]
select col[^A]*
select a?b
...

or as regexp
select /^col.*/
select m!^col.*!    -- like perl's m/.../
[4 Feb 2009 15:15] Susanne Ebrecht
Nice idea. Our development will discuss it.