From f8b8aa8ba5613f9314e60b7594b87632a363285a Mon Sep 17 00:00:00 2001 From: Kemi-Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Mon, 20 Jan 2025 00:26:48 +0000 Subject: [PATCH 1/4] feat: added table to postgresql page needs checking with Ezer for now, so very rough draft at the moment. --- sites/platform/src/add-services/postgresql.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sites/platform/src/add-services/postgresql.md b/sites/platform/src/add-services/postgresql.md index 710276bdba..8c762d7d9b 100644 --- a/sites/platform/src/add-services/postgresql.md +++ b/sites/platform/src/add-services/postgresql.md @@ -365,6 +365,18 @@ Taking a backup or a database export before doing so is strongly recommended. To ensure people who review code changes can't access personally identifiable information stored in your database, [sanitize your preview environments](../development/sanitize-db/postgresql.md). +## Set locale for database + +You can choose your locale when a database is created by setting locale-related variables. There are three ways to set a locale option, as detailed in the table below: + + +| Name | Type | Default | Description | +|--------|-----------|----------|--------------| +| `lc_ctype` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| +| `lc_collate` | `string`|`utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| +| `lc_charset` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| + + ## Multiple databases If you are using version `10`, `11`, `12`, `13`, or later of this service, From 30bd758e862813c5bc20f712ea321f3f671b5543 Mon Sep 17 00:00:00 2001 From: Kemi-Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Mon, 20 Jan 2025 00:30:13 +0000 Subject: [PATCH 2/4] feat: added table to upsun Same as Psh. Need to confirm values in table with team. --- sites/upsun/src/add-services/postgresql.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sites/upsun/src/add-services/postgresql.md b/sites/upsun/src/add-services/postgresql.md index 2e10ccc66a..53be70f065 100644 --- a/sites/upsun/src/add-services/postgresql.md +++ b/sites/upsun/src/add-services/postgresql.md @@ -483,6 +483,18 @@ Taking a backup or a database export before doing so is strongly recommended. To ensure people who review code changes can't access personally identifiable information stored in your database, [sanitize your preview environments](../development/sanitize-db/postgresql.md). +## Set locale for database + +You can choose your locale when a database is created by setting locale-related variables. There are three ways to set a locale option, as detailed in the table below: + + +| Name | Type | Default | Description | +|--------|-----------|----------|--------------| +| `lc_ctype` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| +| `lc_collate` | `string`|`utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| +| `lc_charset` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| + + ## Multiple databases If you are using version `10`, `11`, `12`, `13`, or later of this service, From 1cb5a6c079c12b0e24c6aa4e2b3790a3eafdc6c5 Mon Sep 17 00:00:00 2001 From: Kemi Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:02:43 +0000 Subject: [PATCH 3/4] Update postgresql.md Added correct values for locale table after checking with Ezer. --- sites/platform/src/add-services/postgresql.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sites/platform/src/add-services/postgresql.md b/sites/platform/src/add-services/postgresql.md index 8c762d7d9b..90380d9298 100644 --- a/sites/platform/src/add-services/postgresql.md +++ b/sites/platform/src/add-services/postgresql.md @@ -372,9 +372,9 @@ You can choose your locale when a database is created by setting locale-related | Name | Type | Default | Description | |--------|-----------|----------|--------------| -| `lc_ctype` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| -| `lc_collate` | `string`|`utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| -| `lc_charset` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| +| `default_ctype` | `string` | `C.UTF-8` | The default character classification. Affects any tables created after it's set.| +| `default_collation` | `string`|`C.UTF-8`| The default collation rules. Affects any tables created after it's set.| +| `default_charset` | `string` | `UTF8` | The default encoding character set. Affects any tables created after it's set.| ## Multiple databases From d5ad1ebf82b4da0b5b0019be75520a45d8482492 Mon Sep 17 00:00:00 2001 From: Kemi Elizabeth <97071326+Kemi-Elizabeth@users.noreply.github.com> Date: Wed, 22 Jan 2025 12:03:30 +0000 Subject: [PATCH 4/4] Update postgresql.md Updated values in table after confirming corrections with Ezer. --- sites/upsun/src/add-services/postgresql.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sites/upsun/src/add-services/postgresql.md b/sites/upsun/src/add-services/postgresql.md index 53be70f065..fca84a2a70 100644 --- a/sites/upsun/src/add-services/postgresql.md +++ b/sites/upsun/src/add-services/postgresql.md @@ -490,9 +490,9 @@ You can choose your locale when a database is created by setting locale-related | Name | Type | Default | Description | |--------|-----------|----------|--------------| -| `lc_ctype` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| -| `lc_collate` | `string`|`utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| -| `lc_charset` | `string` | `utf8mb4_unicode_ci` after February 2020 and `latin1` before | The default collation. Affects any tables created after it's set.| +| `default_ctype` | `string` | `C.UTF-8` | The default character classification. Affects any tables created after it's set.| +| `default_collation` | `string`|`C.UTF-8`| The default collation rules. Affects any tables created after it's set.| +| `default_charset` | `string` | `UTF8` | The default encoding character set. Affects any tables created after it's set.| ## Multiple databases