parse_coerce.diff
                        
                             · 667 B · Diff
                        
                    
                    
                      
                        Raw
                      
                    
                      
                    
                        
                          
                        
                    
                    
                
                
                
            diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 2051f9f11a6..d34a14aa527 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -276,7 +276,7 @@ coerce_type(ParseState *pstate, Node *node,
                 * or it won't be able to obey the bizarre SQL-spec input rules. (Ugly
                 * as sin, but so is this part of the spec...)
                 */
-               if (baseTypeId == INTERVALOID)
+               if (baseTypeId == INTERVALOID || baseTypeId >= 16384)
                        inputTypeMod = baseTypeMod;
                else
                        inputTypeMod = -1;
                | 1 | diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c | 
| 2 | index 2051f9f11a6..d34a14aa527 100644 | 
| 3 | --- a/src/backend/parser/parse_coerce.c | 
| 4 | +++ b/src/backend/parser/parse_coerce.c | 
| 5 | @@ -276,7 +276,7 @@ coerce_type(ParseState *pstate, Node *node, | 
| 6 | * or it won't be able to obey the bizarre SQL-spec input rules. (Ugly | 
| 7 | * as sin, but so is this part of the spec...) | 
| 8 | */ | 
| 9 | - if (baseTypeId == INTERVALOID) | 
| 10 | + if (baseTypeId == INTERVALOID || baseTypeId >= 16384) | 
| 11 | inputTypeMod = baseTypeMod; | 
| 12 | else | 
| 13 | inputTypeMod = -1; |