← Back to team overview

maria-discuss team mailing list archive

Re: virtual columns



5 февр. 2010, в 04:42, Federico Razzoli написал(а):

I've read that MariaDB 5.2 will support virtual columns and I've read the virtual columns' specifications:


I think there is a problem in that document. In CREATE TABLE and in ALTER TABLE commands you can create a virtual column. The syntax allows to specify that the column is STORED, if you wish. But it does not allow to specify that it's NOT STORED. This causes a little problem: one can not switch a STORED column to NOT STORED - one must to DROP and re-ADD the column.

Our syntax is
<type> [GENERATED ALWAYS] AS ( <expression> ) [VIRTUAL | PERSISENT]

default is persistent. Syntax changed to be more compatible with MS SQL and Oracle

Also, I have a question: will virtual columns be able to use UDF's?

Any legal expression which can be calculated should be allowed.

Follow ups