downcase_delimited_identifier - Amazon Redshift
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

downcase_delimited_identifier

值(默认为粗体)

on、off

描述

此配置正被停用。请改用 enable_case_sensitive_identifier

使超级解析器能够读取大写或混合大小写的 JSON 字段。此外,对具有数据库、schema、表和列混合大小写名称的受支持 PostgreSQL 数据库启用联合查询支持。要使用区分大小写的标识符,请将此参数设置为 off。

使用说明

  • 如果您使用的是行级别安全性或动态数据屏蔽功能,我们建议在集群或工作组的参数组中设置 downcase_delimited_identifier 值。这可确保在创建和附加策略,然后查询应用了策略的关系的整个过程中,downcase_delimited_identifier 保持不变。有关行级别安全性的信息,请参阅行级别安全性。有关动态数据屏蔽的信息,请参阅动态数据掩蔽

  • 当您将 downcase_delimited_identifier 设置为 off 并创建表时,可以设置区分大小写的列名称。当您将 downcase_delimited_identifier 设置为 on 并查询表时,列名称会采用小写。这可能会产生与 downcase_delimited_identifier 设置为 off 时不同的查询结果。考虑以下示例:

    SET downcase_delimited_identifier TO off; --Amazon Redshift preserves case for column names and other identifiers. --Create a table with two columns that are identical except for the case. CREATE TABLE t ("c" int, "C" int); INSERT INTO t VALUES (1, 2); SELECT * FROM t; c | C ---+--- 1 | 2 (1 row) SET enable_downcase_delimited_identifier TO on; --Amazon Redshift no longer preserves case for column names and other identifiers. SELECT * FROM t; c | c ---+--- 1 | 1 (1 row)
  • 我们建议,查询附加了动态数据掩蔽或行级安全策略的表的常规用户使用默认的 downcase_delimited_identifier 设置。有关行级安全性的更多信息,请参阅行级别安全性。有关动态数据屏蔽的信息,请参阅动态数据掩蔽