OSDN Git Service

Fix SEGV caused by duplicate memoize hints
[pghintplan/pg_hint_plan.git] / pg_hint_plan.c
index 8534cea..2dca0b3 100644 (file)
@@ -216,9 +216,13 @@ static const char *HintTypeName[] = {
        "leading",
        "set",
        "rows",
-       "parallel"
+       "parallel",
+       "memoize"
 };
 
+StaticAssertDecl(sizeof(HintTypeName) / sizeof(char *) == NUM_HINT_TYPE,
+                                "HintTypeName and HintType don't match");
+
 /* hint status */
 typedef enum HintStatus
 {