diff --git a/common/src/system_column.rs b/common/src/system_column.rs index 15af5548..c368e163 100644 --- a/common/src/system_column.rs +++ b/common/src/system_column.rs @@ -5,9 +5,9 @@ //! leaves the server. A user column is stored under its ordinal and shown only //! under its alias, so an unmapped name at the public boundary is a leak; these //! have no alias to hide behind, because the server -- not the user -- chose -//! their names. Anything asking "is this name public?" or "may a user claim -//! this name?" is asking about this list, so the list lives here once and the -//! `CREATE TABLE` fragments that make it true live next to it. +//! their names. The list lives here once and the `CREATE TABLE` fragments that +//! make it true live next to it. Alias validation may still be conditional: the +//! virtual `account` API name conflicts only on ACCOUNTING-enabled tables. /// A column every managed table carries, named the same in Postgres and in the /// public API. @@ -85,8 +85,9 @@ pub fn system_column_names() -> impl Iterator { .chain(std::iter::once(ACCOUNT_REFERENCE_COLUMN)) } -/// Whether `name` is a system column: a name that is safe to show a client -/// as-is, and that a user may not claim for a column alias or a table. +/// Whether `name` belongs to the system column vocabulary and is safe to show +/// to a client as-is. Whether a user may claim a virtual API name as an alias +/// is decided with the table's capabilities in scope. pub fn is_system_column(name: &str) -> bool { name == ACCOUNT_API_COLUMN || system_column_names().any(|system_name| system_name == name) } @@ -115,7 +116,7 @@ mod tests { } #[test] - fn a_conditional_column_is_reserved_on_every_table() { + fn conditional_system_names_are_recognized() { assert!(is_system_column(ACCOUNT_REFERENCE_COLUMN)); assert!(is_system_column(ACCOUNT_API_COLUMN)); } diff --git a/server b/server index 5fa954d3..4fe6da6a 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 5fa954d3f45230069c2ca3fa169f014a689cac84 +Subproject commit 4fe6da6ac72f37cd082607e2c9c9489d48bfa4ed