Locale and Formatting
The display format, time zone, character encoding, and currency and numeric locale formats vary depending on service scenarios. A unified format setting helps ensure the accuracy and readability of data display. This section describes GUC parameters related to the display format, including DateStyle, IntervalStyle, TimeZone, client_encoding, and lc_*.
Parameter Description
| Parameter | Type | Description |
|---|---|---|
| DateStyle | String | Definition: Specifies the display format for date and time values, and the rules for interpreting ambiguous date input values. This parameter consists of two independent parts: the output format model (ISO, Postgres, SQL, or German) and the input/output order of year/month/day (DMY, MDY, or YMD). The two parts can be set separately or together. The keywords Euro and European are synonyms for DMY. The keywords US, NonEuro, and NonEuropean are synonyms for MDY. The ISO format is recommended. Postgres, SQL, and German use abbreviations to represent time zones, such as EST, WST, and CST. NOTE: gs_initdb initializes this parameter to the same value as that of lc_time. Range: A string. Default Value: ISO, MDY. |
| IntervalStyle | Enum | Definition: Specifies the display format of interval values. Range: Enumerated values.
Default Value: postgres. |
| TimeZone | String | Definition: Specifies the time zone used for displaying and interpreting time stamps. Range: A string. Default Value: GMT. |
| timezone_abbreviations | String | Definition Specifies the list of time zone abbreviations that are accepted by the server. Range: A string. Default Value: Default. NOTE: Default indicates the abbreviation for the general time zone. However, there are other abbreviations such as 'Australia' and 'India' that are used to define specific installations. |
| extra_float_digits | Integer | Definition: Specifies the number of digits displayed for floating-point values, including float4, float8, and geometric data types. The parameter value is added to the standard number of digits (FLT_DIG or DBL_DIG as appropriate). Range: -15 to 3. NOTE:
Default Value: 0. |
| client_encoding | String | Definition: Specifies the character encoding type on the client. Set this parameter based on the frontend services. Keeping the client and server encodings consistent improves efficiency. Range: All character encoding types compatible with PostgreSQL. UTF8 indicates that the database's character encoding type is used. NOTE:
Default Value: UTF8. |
| lc_monetary | String | Definition: Specifies the display format for monetary values. It affects the output of functions such as to_char. Acceptable values are system-dependent. Range: A string. NOTE:
Default Value: en_US.UTF-8. |
| lc_numeric | String | Definition Specifies the display format for numbers. It affects the output of functions such as to_char. Acceptable values are system-dependent. Range: A string. NOTE:
Default Value: en_US.UTF-8. |
| lc_time | String | Definition: Specifies the display format of time and region. It affects the output of functions such as to_char. Acceptable values are system-dependent. Range: A string. NOTE:
Default Value: en_US.UTF-8. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot