> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# format_* 格式设置

> format_* 生成组中的 ClickHouse 格式设置。

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>类型</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>默认值</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          无需重启即可更改
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

这些设置是根据[源文件](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h)自动生成的。

<div id="format_display_secrets_in_show_and_select">
  ## format\_display\_secrets\_in\_show\_and\_select
</div>

<SettingsInfoBlock type="Bool" default_value="0" />

启用或禁用在针对表、数据库、表函数和字典的 `SHOW` 与 `SELECT` 查询中显示敏感信息。

希望查看敏感信息的用户，还必须启用
[`display_secrets_in_show_and_select` 服务器设置](/docs/zh/reference/settings/server-settings/settings#display_secrets_in_show_and_select)
并拥有
[`displaySecretsInShowAndSelect`](/docs/zh/reference/statements/grant#displaysecretsinshowandselect) 权限。

可能的值：

* 0 — 已禁用。
* 1 — 已启用。

<div id="format_geojson_validate_geometry">
  ## format\_geojson\_validate\_geometry
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

<VersionHistory rows={[{"id": "row-1","items": [{"label": "26.7"},{"label": "1"},{"label": "用于控制 GeoJSON 格式在读取和写入时是否强制执行 RFC 7946 几何有效性（如每条 line 和 ring 的最少点数、ring 闭合以及 multi-geometries 非空）的新设置"}]}]} />

控制 `GeoJSON` 格式是否在读写两个方向上强制执行 RFC 7946 的几何有效性规则。

启用时 (默认) ，不符合 GeoJSON 形态规则的几何对象会被拒绝：少于两个点的 `LineString` (或 `MultiLineString` 中的一条 line) ；少于四个点或首尾点不同 (即 ring 未闭合) 的 `Polygon` 或 `MultiPolygon` ring；以及空的 `MultiLineString`、`Polygon` 或 `MultiPolygon`。这同时适用于读取和写入：读取时，此类文档会被拒绝；写入时，此类 ClickHouse 值也会被拒绝，而不是生成一个会被输入格式拒绝的文档。

禁用时，则不会强制执行这些形态规则：此类 geometries 会按原样读取和写入，因此退化 geometries 可以 round-trip，但写出的文档可能不是有效的 GeoJSON。

这种校验仅限于结构层面：它只检查点数和 ring 是否闭合，不会检查形态在几何上的正确性——不会强制要求 ring 方向 (右手法则 / winding order) ，并且会接受结构上有效但几何上退化的 geometries，例如面积为零的 polygon、自相交的 ring，或 hole 位于外 ring 之外的 polygon。无论此设置是否启用，非有限坐标 (`NaN`、`Inf`) 始终都会被拒绝，因为它们无法表示为 JSON 数值。

<div id="format_json_object_each_row_column_for_object_name">
  ## format\_json\_object\_each\_row\_column\_for\_object\_name
</div>

用于在 [JSONObjectEachRow](/docs/zh/reference/formats/JSON/JSONObjectEachRow) 格式中存储/写入对象名称的列名。
列类型应为 String。若值为空，则会使用默认名称 `row_{i}` 作为对象名称。

<div id="format_protobuf_use_autogenerated_schema">
  ## format\_protobuf\_use\_autogenerated\_schema
</div>

<SettingsInfoBlock type="Bool" default_value="1" />

在未设置 format\_schema 时，使用自动生成的 Protobuf

<div id="format_tsv_null_representation">
  ## format\_tsv\_null\_representation
</div>

<SettingsInfoBlock type="String" default_value="\N" />

TSV 格式的自定义 NULL 表示形式
