1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-11 00:12:06 +03:00

Use C99-designated initializer syntax for more arrays

This is in the same spirit as ef5e2e9085, updating this time some
arrays in parser.c, relpath.c, guc_tables.c and pg_dump_sort.c so as the
order of their elements has no need to match the enum structures they
are based on anymore.

Author: Jelte Fennema-Nio
Reviewed-by: Jian He, Japin Li
Discussion: https://postgr.es/m/CAGECzQT3caUbcCcszNewCCmMbCuyP7XNAm60J3ybd6PN5kH2Dw@mail.gmail.com
This commit is contained in:
Michael Paquier
2024-02-28 08:42:36 +09:00
parent e1724af42c
commit afd8ef3909
4 changed files with 128 additions and 173 deletions

View File

@@ -31,10 +31,10 @@
* pg_relation_size().
*/
const char *const forkNames[] = {
"main", /* MAIN_FORKNUM */
"fsm", /* FSM_FORKNUM */
"vm", /* VISIBILITYMAP_FORKNUM */
"init" /* INIT_FORKNUM */
[MAIN_FORKNUM] = "main",
[FSM_FORKNUM] = "fsm",
[VISIBILITYMAP_FORKNUM] = "vm",
[INIT_FORKNUM] = "init",
};
StaticAssertDecl(lengthof(forkNames) == (MAX_FORKNUM + 1),