diff --git a/product_docs/docs/epas/17/reference/sql_reference/03_functions_and_operators/nls_functions/index.mdx b/product_docs/docs/epas/17/reference/sql_reference/03_functions_and_operators/nls_functions/index.mdx index 11dbc80f8fe..5a1562ddecc 100644 --- a/product_docs/docs/epas/17/reference/sql_reference/03_functions_and_operators/nls_functions/index.mdx +++ b/product_docs/docs/epas/17/reference/sql_reference/03_functions_and_operators/nls_functions/index.mdx @@ -10,7 +10,7 @@ EDB Postgres Advanced Server version 17 and later provides the support for NLS f ## NLS config file -The `edb_redwood_nls.config` file maintains the list of NLS parameters mapping with an equivalent collation. The NLS parameters and an equivalent collation are listed in each row in the config file separated by commas respectively. The config file contains a default list of NLS parameters and an equivalent collation pairs. +The `edb_redwood_nls.config` file maintains the list of NLS parameters mapping with an equivalent collation. The NLS parameters and an equivalent collation are listed in each row in the config file separated by commas respectively. The config file contains a default list of NLS parameters and an equivalent collation pairs. By default the file is located at `EPAS_INSTALLATION_DIRECTORY/share/postgresql/contrib/`.
The default NLS config file contents: ARABIC,"pg_catalog"."default"
@@ -104,12 +104,16 @@ The config file can contain multiple mappings for a single NLS parameter. You ca You can add a new mapping in the NLS config file, - by manually editing the config file in the format `NLS_parameter,.`. - - or by using the `edb_nls_cf_insert` function. + - or by using the `edb_nls_cf_insert` function. When using `edb_nls_cf_insert` function it's crucial to ensure that the file has the correct write permissions. Without the appropriate permissions, attempts to modify the file will fail, potentially leading to errors or incomplete configurations. -where `.` is to be obtained from `pg_collation` catalog and mapped to a valid NLS parameter. +where `.` is to be obtained from `pg_collation` catalog and mapped to a valid NLS parameter. Only the collations with an encoding of `-1` (which represents "any encoding") or the database encoding are allowed. Add this mapping before using the NLS parameter in the NLS functions. +If you're encountering NOTICE messages due to invalid entries in the NLS config file, the best approach is to manually remove those invalid entries. These messages typically occur when the database is trying to reference locales or collations that no longer exist or are incorrectly specified in the configuration file. + +It's important to recognize that collation values are platform-dependent, meaning a collation available on one platform might not be present on another. To avoid compatibility issues, always use collations that are available in the `pg_collation` table within your environment. + **Usage of NLS config file** - Each client session reads the config file and stores the NLS parameters and collation values in in-mem HASH data structure when any of the NLS function is called for the first time.