AWS aurora-dsql documentation change
Summary
Added documentation for identity columns in CREATE TABLE syntax, including GENERATED AS IDENTITY clause, cache considerations, and behavior of ALWAYS/BY DEFAULT options
Security assessment
Changes focus on functional behavior of identity columns and sequence management. The cache warning relates to performance, not security. No authentication, authorization, or data protection mechanisms are discussed.
Diff
diff --git a/aurora-dsql/latest/userguide/create-table-syntax-support.md b/aurora-dsql/latest/userguide/create-table-syntax-support.md index 88e5949e4..cc69c497f 100644 --- a//aurora-dsql/latest/userguide/create-table-syntax-support.md +++ b//aurora-dsql/latest/userguide/create-table-syntax-support.md @@ -4,0 +5,2 @@ +Identity columns + @@ -24,0 +27 @@ + GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY ( sequence_options ) | @@ -41,0 +45,18 @@ +## Identity columns + +###### Note + +When using `IDENTITY` columns, the value of `CACHE` should be carefully considered. For more information, see the Important callout on the [CREATE SEQUENCE](./create-sequence-syntax-support.html) page. + +For guidance on how best to use `IDENTITY` columns based on workload patterns, see [Working with sequences and identity columns](./sequences-identity-columns-working-with.html). + +The `GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY ( `sequence_options` )` clause creates the column as an _identity column_. It will have an implicit sequence attached to it and in newly-inserted rows the column will automatically have values from the sequence assigned to it. Such a column is implicitly `NOT NULL`. + +The clauses `ALWAYS` and `BY DEFAULT` determine how explicitly user-specified values are handled in `INSERT` and `UPDATE` commands. + +In an `INSERT` command, if `ALWAYS` is selected, a user-specified value is only accepted if the `INSERT` statement specifies `OVERRIDING SYSTEM VALUE`. If `BY DEFAULT` is selected, then the user-specified value takes precedence. + +In an `UPDATE` command, if `ALWAYS` is selected, any update of the column to any value other than `DEFAULT` will be rejected. If `BY DEFAULT` is selected, the column can be updated normally. (There is no `OVERRIDING` clause for the `UPDATE` command.) + +The `sequence_options` clause can be used to override the parameters of the sequence. The available options include those shown for [CREATE SEQUENCE](./create-sequence-syntax-support.html), plus `SEQUENCE NAME `name``. Without `SEQUENCE NAME`, the system chooses an unused name for the sequence. +