On 30/08/2013 11:28, Robbert-Jan wrote:
> Hi,
>  
> I like to propose a more consistent syntax for computed columns and
> identity columns:
>  
> Computed columns are now defined in DDL as
>  
> <ColumnName> [<DataType>] GENERATED ALWAYS AS (<Expression>)
>  
> while identity columns (as of FB 3.0 CORE-1385) are defined as:
>  
> <ColumnName> {<DataType>|<DomainName>} GENERATED {ALWAYS|BY DEFAULT}
> AS IDENITITY
>  
> Note the differences:
> - for computed columns the datatype is optional (if ommitted the
> system will find an appropriate datatype)
> - identity columns can be defined as both datatype and domain, where
> computed columns can only be defined as datatype
> - identity columns can be defined as both ALWAYS (although not yet
> implemented) and BY DEFAULT, while computed columns can only be
> defined as ALWAYS
>  
> To make this more consistent, I like to propose to:
> - also support domains for computed columns;

Agreed.

> - also make the specification of datatype/domain for identity columns
> optional (if it is ommitted the system should assume INTEGER);

The type shall not be necessary, and the standard say it will implicitly
be "exact numeric with scale 0". However, I disagree on INTEGER.

> - also support GENERATED BY DEFAULT for computed columns.

Does not make sense.


Adriano


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to