-
Norvald H. Ryeng authored
WITH REQUIRED OPTION Problem: The user isn't allowed to alter a table to create generated non-nullable geometry columns if there is data in the table. Since there is no implicit default value for geometry columns, there is a restriction requiring non-nullable geometry columns that are added to a table containing data to have an explicitly set default value. The generated value is not recognized as a default value. Solution: Recognize the generated value as the default value for the column. However, unlike columns of other types, the generation expression for geometry columns may not return NULL unless the column is nullable. There is no implicit conversion of NULL values. For stored generated columns, the expression is computed during the ALTER statement, and if any computed value is invalid, the ALTER statement is aborted. Adding virtual generated columns with expressions evaluating to NULL or something that is not a well-formed geometry is allowed. The ALTER statement will not fail. However, whenever the expression is evaluated, the statement will fail. Change-Id: I310f119c0bbf26b02d04dbdff35b88fb7c714977
Norvald H. Ryeng authoredWITH REQUIRED OPTION Problem: The user isn't allowed to alter a table to create generated non-nullable geometry columns if there is data in the table. Since there is no implicit default value for geometry columns, there is a restriction requiring non-nullable geometry columns that are added to a table containing data to have an explicitly set default value. The generated value is not recognized as a default value. Solution: Recognize the generated value as the default value for the column. However, unlike columns of other types, the generation expression for geometry columns may not return NULL unless the column is nullable. There is no implicit conversion of NULL values. For stored generated columns, the expression is computed during the ALTER statement, and if any computed value is invalid, the ALTER statement is aborted. Adding virtual generated columns with expressions evaluating to NULL or something that is not a well-formed geometry is allowed. The ALTER statement will not fail. However, whenever the expression is evaluated, the statement will fail. Change-Id: I310f119c0bbf26b02d04dbdff35b88fb7c714977
Loading