mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-04 00:02:52 -05:00 
			
		
		
		
	Small code simplifications
strVal() can be used in a couple of places instead of coding the same thing by hand.
This commit is contained in:
		
							parent
							
								
									25a9e54d2d
								
							
						
					
					
						commit
						6114040711
					
				@ -544,7 +544,7 @@ deflist_to_tuplestore(ReturnSetInfo *rsinfo, List *options)
 | 
			
		||||
		nulls[0] = false;
 | 
			
		||||
		if (def->arg)
 | 
			
		||||
		{
 | 
			
		||||
			values[1] = CStringGetTextDatum(((Value *) (def->arg))->val.str);
 | 
			
		||||
			values[1] = CStringGetTextDatum(strVal(def->arg));
 | 
			
		||||
			nulls[1] = false;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
 | 
			
		||||
@ -13890,7 +13890,7 @@ func_expr_common_subexpr:
 | 
			
		||||
					 * Convert SystemTypeName() to SystemFuncName() even though
 | 
			
		||||
					 * at the moment they result in the same thing.
 | 
			
		||||
					 */
 | 
			
		||||
					$$ = (Node *) makeFuncCall(SystemFuncName(((Value *) llast($5->names))->val.str),
 | 
			
		||||
					$$ = (Node *) makeFuncCall(SystemFuncName(strVal(llast($5->names))),
 | 
			
		||||
											   list_make1($3),
 | 
			
		||||
											   COERCE_EXPLICIT_CALL,
 | 
			
		||||
											   @1);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user