This section describes the DDL commands pertaining to expression aliases.
Define a new expression alias in the schema.
[ WITH with-item [, ...] ]
CREATE ALIAS alias-name := alias-expr ;
[ WITH with-item [, ...] ]
CREATE ALIAS alias-name "{"
USING alias-expr;
[ CREATE ANNOTATION attr-name := attr-value; ... ]
"}" ;
where with-item is:
[ module-alias := ] MODULE module-name
CREATE ALIAS
defines a new expression alias in the schema.
The schema-level expression aliases are functionally equivalent
to expression aliases defined in a statement WITH block,
but are available to all queries using the schema and can be
introspected.
If name is qualified with a module name, then the alias is created in that module, otherwise it is created in the current module. The alias name must be distinct from that of any existing schema item in the module.
Most sub-commands and options of this command are identical to the SDL alias declaration, with some additional features listed below:
An optional list of module alias declarations to be used in the alias definition.
An optional list of annotation values for the alias.
See CREATE ANNOTATION
for details.