From b3fe06934b40489d1b4b157677f1292bc698c7da Mon Sep 17 00:00:00 2001 From: Joseph Koshakow Date: Sun, 9 Jul 2023 13:12:16 -0400 Subject: [PATCH 1/3] Remove dead code in DecodeInterval This commit removes dead code for handling unit type RESERVE. There used to be a unit called "invalid" that was of type RESERVE. At some point that unit was removed and there were no more units of type RESERVE. Therefore, the code for RESERVE unit handling is unreachable. --- src/backend/utils/adt/datetime.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index 5d8d583ddc..2a5dddc43f 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -3582,11 +3582,6 @@ DecodeInterval(char **field, int *ftype, int nf, int range, type = uval; break; - case RESERV: - tmask = (DTK_DATE_M | DTK_TIME_M); - *dtype = uval; - break; - default: return DTERR_BAD_FORMAT; } -- 2.34.1