Philip, Igor
Why is ExtractValue() not allowed for a virtual column?
Why can't I do this:
CREATE TABLE sbtest (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
doc TEXT,
username varchar(10) as (ExtractValue(doc, '/user/username')) virtual,
PRIMARY KEY (id),
)
...but can do this:
CREATE TABLE sbtest (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
doc TEXT,
username varchar(10) as (ExtractValue(doc, '/user/username')) virtual,
PRIMARY KEY (id)
)
(Just for fun, imagine "doc" containing an xml document like
<user>
<id>1</id>
<username>hingo</username>
<name>Henrik Ingo</name>
<status time="2010-21-10 13:16">I'm writing an example XML document</status>
<friends>