> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# configurações de sessão default_*

> Configurações de sessão do ClickHouse no grupo default_* gerado.

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["Versão", "Valor padrão", "Comentário"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        Histórico de versões
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

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
  }}>Tipo</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>Padrão</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          Pode ser alterado sem reiniciar
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

Essas configurações estão disponíveis em [system.settings](/pt-BR/reference/system-tables/settings) e são geradas automaticamente a partir do [código-fonte](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/Settings.cpp).

<div id="default_materialized_view_sql_security">
  ## default\_materialized\_view\_sql\_security
</div>

<SettingsInfoBlock type="SQLSecurityType" default_value="DEFINER" />

Permite definir o valor padrão da opção SQL SECURITY ao criar uma visão materializada. [Mais sobre SQL security](/pt-BR/reference/statements/create/view#sql_security).

O valor padrão é `DEFINER`.

<div id="default_max_bytes_in_join">
  ## default\_max\_bytes\_in\_join
</div>

<SettingsInfoBlock type="UInt64" default_value="1000000000" />

Tamanho máximo da tabela do lado direito se um limite for necessário, mas `max_bytes_in_join` não estiver definido.

<div id="default_normal_view_sql_security">
  ## default\_normal\_view\_sql\_security
</div>

<SettingsInfoBlock type="SQLSecurityType" default_value="INVOKER" />

Permite definir a opção padrão de `SQL SECURITY` ao criar uma view normal. [Mais sobre SQL security](/pt-BR/reference/statements/create/view#sql_security).

O valor padrão é `INVOKER`.

<div id="default_table_engine">
  ## default\_table\_engine
</div>

<SettingsInfoBlock type="DefaultTableEngine" default_value="MergeTree" />

Mecanismo de tabela padrão usado quando `ENGINE` não é definido em uma instrução `CREATE`.

Valores possíveis:

* uma string que representa qualquer nome válido de mecanismo de tabela

Valor padrão no Cloud: `SharedMergeTree`.

**Exemplo**

Consulta:

```sql theme={null}
SET default_table_engine = 'Log';

SELECT name, value, changed FROM system.settings WHERE name = 'default_table_engine';
```

Resultado:

```response theme={null}
┌─name─────────────────┬─value─┬─changed─┐
│ default_table_engine │ Log   │       1 │
└──────────────────────┴───────┴─────────┘
```

Neste exemplo, qualquer nova tabela que não especifique um `Engine` usará o mecanismo de tabela `Log`:

Consulta:

```sql theme={null}
CREATE TABLE my_table (
    x UInt32,
    y UInt32
);

SHOW CREATE TABLE my_table;
```

Resultado:

```response theme={null}
┌─statement────────────────────────────────────────────────────────────────┐
│ CREATE TABLE default.my_table
(
    `x` UInt32,
    `y` UInt32
)
ENGINE = Log
└──────────────────────────────────────────────────────────────────────────┘
```

<div id="default_temporary_table_engine">
  ## default\_temporary\_table\_engine
</div>

<SettingsInfoBlock type="DefaultTableEngine" default_value="Memory" />

Igual a [default\_table\_engine](/pt-BR/reference/settings/session-settings/default#default_table_engine), mas para tabelas temporárias.

Neste exemplo, qualquer nova tabela temporária que não especifique um `Engine` usará o mecanismo de tabela `Log`:

Consulta:

```sql theme={null}
SET default_temporary_table_engine = 'Log';

CREATE TEMPORARY TABLE my_table (
    x UInt32,
    y UInt32
);

SHOW CREATE TEMPORARY TABLE my_table;
```

Resultado:

```response theme={null}
┌─statement────────────────────────────────────────────────────────────────┐
│ CREATE TEMPORARY TABLE default.my_table
(
    `x` UInt32,
    `y` UInt32
)
ENGINE = Log
└──────────────────────────────────────────────────────────────────────────┘
```

<div id="default_view_definer">
  ## default\_view\_definer
</div>

<SettingsInfoBlock type="String" default_value="CURRENT_USER" />

Permite definir a opção `DEFINER` padrão ao criar uma view. [Mais sobre SQL security](/pt-BR/reference/statements/create/view#sql_security).

O valor padrão é `CURRENT_USER`.
