Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shnikd committed Mar 27, 2024
1 parent 7ad795e commit 2d248ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ydb/docs/en/core/postgresql/statements/create_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The `CREATE TABLE` statement is used to create an empty table in the current dat
{% include [syntax.md](../../../_includes/postgresql/statements/create_table/syntax.md) %}

When creating a table, you can specify:
1. **Table Type**: `TEMPORARY` / `TEMP` – a temporary table that is automatically deleted at the regular end of the session, otherwise it will no longer be available and will be automatically deleted after the time has elapsed. If this parameter is not set (left empty), a permanent table is created.
1. **Table Type**: {% include [x](../../_includes/temp_table_description.md) %}
2. **Table Name**: `<table name>` – you can use English letters in lowercase, numbers, and underscores. For example, the table name "People" will be stored as "people". For more information, see [Identifiers and Key Words](https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS).
3. **Column Name**: `<column name>` – the same naming rules apply as for table names.
4. **Data Type**: `<column data type>`[standard PostgreSQL data types](https://www.postgresql.org/docs/14/datatype.html) are specified.
Expand Down Expand Up @@ -44,7 +44,7 @@ In this example, we created the "people" table with a constraint block (`CONSTRA

{% include [create_table_temp.md](../../../_includes/postgresql/statements/create_table/create_table_temp.md) %}

The temporary table is defined using the `TEMPORARY` or `TEMP` keywords. It exists until the end of the session, after which it is automatically deleted.
The temporary table is defined using the `TEMPORARY` or `TEMP` keywords.


## Creating a table with sorting conditions {#create_table_collate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,14 @@ CREATE TABLE my_table (
{% endif %}

{% if feature_temp_tables %}
{% if feature_olap_tables %}#{%endif%}## Creating a temporary table {#row-additional}
{% if feature_olap_tables %}#{%endif%}## Creating a temporary table {#temporary_tables}
```sql
CREATE TEMPORARY TABLE table_name (
...
);
```
`TEMPORARY` / `TEMP` – a temporary table that is automatically deleted at the regular end of the session, otherwise it will no longer be available and will be automatically deleted after the time has elapsed. If this parameter is not set (left empty), a permanent table is created.

{% include [x](../../../../../_includes/temp_table_description.md) %}

{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions ydb/docs/ru/core/postgresql/statements/create_table.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CREATE [TEMPORARY | TEMP] TABLE <table name> (
);
```
При создании таблицы можно задать:
1. **Тип таблицы**: `TEMPORARY` / `TEMP` – временная таблица, которая автоматически удаляется при штатном завершении сессии, в противном случае она становится недоступна и удаляется по истечении некоторого времени. Если параметр не задан (оставлен пустым) – создается постоянная таблица;
1. **Тип таблицы**: {% include [x](../../_includes/temp_table_description.md) %}
2. **Имя таблицы**: `<table name>` – можно использовать английские буквы в нижнем регистре, цифры и нижнее подчёркивание. Например, название таблицы "People" будет сохранено как "people";
3. **Имя столбца/колонки**: <column name> – действую такие же правила нейминга как и для имен таблиц;
4. **Тип данных**: <column data type> – указываются [стандартные типы](https://www.postgresql.org/docs/current/datatype.html) данных PostgreSQL;
Expand Down Expand Up @@ -95,7 +95,7 @@ CREATE TEMPORARY TABLE people (
);
```

Временная таблица задается через ключевое слово `TEMPORARY` / `TEMP`. Она существует до конца сессии, далее таблица автоматически удаляется.
Временная таблица задается через ключевые слова `TEMPORARY` или `TEMP`.


## Создание таблицы с условиями сортировки {#create_table_collate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ CREATE TABLE my_table (
{% endif %}

{% if feature_temp_tables %}
{% if feature_olap_tables %}#{%endif%}## Создание временных таблиц {#row-additional}
{% if feature_olap_tables %}#{%endif%}## Создание временных таблиц {#temporary_tables}
```sql
CREATE TEMPORARY TABLE table_name (
...
);
```
`TEMPORARY` / `TEMP` – временная таблица, которая автоматически удаляется при штатном завершении сессии, в противном случае она становится недоступна и удаляется по истечении некоторого времени. Если параметр не задан (оставлен пустым) – создается постоянная таблица.
{% include [x](../../../../../_includes/temp_table_description.md) %}

{% endif %}

Expand Down

0 comments on commit 2d248ac

Please sign in to comment.