aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc_tables.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-03-01 18:03:48 +0900
committerMichael Paquier <michael@paquier.xyz>2024-03-01 18:03:48 +0900
commit655dc310460c601d434d05339b7fa46ed97675b3 (patch)
tree9c502f28b148dea717d2f41ed14f541198dea806 /src/backend/utils/misc/guc_tables.c
parentdef0ce3370689b939c6d7a3c3eb824d69989ef6e (diff)
downloadpostgresql-655dc310460c601d434d05339b7fa46ed97675b3.tar.gz
postgresql-655dc310460c601d434d05339b7fa46ed97675b3.zip
Simplify pg_enc2gettext_tbl[] with C99-designated initializer syntax
This commit switches pg_enc2gettext_tbl[] in encnames.c to use a C99-designated initializer syntax. pg_bind_textdomain_codeset() is simplified so as it is possible to do a direct lookup at the gettext() array with a value of the enum pg_enc rather than doing a loop through all its elements, as long as the encoding value provided by GetDatabaseEncoding() is in the correct range of supported encoding values. Note that PG_MULE_INTERNAL gains a value in the array, pointing to NULL. Author: Jelte Fennema-Nio Discussion: https://postgr.es/m/CAGECzQT3caUbcCcszNewCCmMbCuyP7XNAm60J3ybd6PN5kH2Dw@mail.gmail.com
Diffstat (limited to 'src/backend/utils/misc/guc_tables.c')
0 files changed, 0 insertions, 0 deletions