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

enable_case_sensitive_super_attribute

值(默认为粗体)

true,false

描述

一个配置值,用于确定导航具有非分隔属性名称的 SUPER 数据类型结构时是否区分大小写。将 enable_case_sensitive_super_attribute 设置为 true 时,导航具有非分隔属性名称的 SUPER 类型结构时区分大小写。将该值设置为 false 时,导航具有非分隔属性名称的 SUPER 类型结构时不区分大小写。

当您使用双引号括起属性名并将 enable_case_sensitive_identifier 设置为 true 时,将始终保留大小写,不论如何设置 enable_case_sensitive_super_attribute 配置选项。

enable_case_sensitive_super_attribute 仅适用于 SUPER 数据类型的列。对于所有其他列,请考虑改为使用 enable_case_sensitive_identifier

有关 SUPER 数据类型的更多信息,请参阅 SUPER 类型在 Amazon Redshift 中摄取和查询半结构化数据

示例

以下示例显示了在启用和禁用 enable_case_sensitive_super_attribute 的情况下,选择 SUPER 值的结果。

--Create a table with a SUPER column. CREATE TABLE tbl (col SUPER); --Insert values. INSERT INTO tbl VALUES (json_parse('{ "A": "A", "a": "a" }')); SET enable_case_sensitive_super_attribute TO ON; SELECT col.A FROM tbl; a ----- "A" (1 row) SELECT col.a FROM tbl; a ----- "a" (1 row) SET enable_case_sensitive_super_attribute TO OFF; SELECT col.A FROM tbl; a ----- "a" (1 row) SELECT col.a FROM tbl; a ----- "a" (1 row)

使用说明

  • 视图和实体化视图遵循其创建时的 enable_case_sensitive_super_attribute 值。后期绑定视图、存储过程和用户定义的函数遵循查询时的 enable_case_sensitive_super_attribute 值。

  • 如果您为实体化视图使用自动刷新,我们建议您在集群或工作组的参数组中设置 enable_case_sensitive_identifier value。这样可以确保在实体化视图刷新时 enable_case_sensitive_identifier 保持不变。有关实体化视图自动刷新的信息,请参阅刷新实体化视图。有关在参数组中设置配置值的信息,请参阅《Amazon Redshift 管理指南》中的 Amazon Redshift 参数组

  • 无论 enable_case_sensitive_super_attribute 的值如何,语句结果中的列名始终为小写。要使列名也区分大小写,请启用 enable_case_sensitive_identifier

  • 我们建议,查询附加了行级安全策略的表的常规用户使用默认的 enable_case_sensitive_identifier 设置。有关行级安全性的更多信息,请参阅行级别安全性