allow-assignment-coercions-1.patch

text/x-patch

Filename: allow-assignment-coercions-1.patch
Type: text/x-patch
Part: 0
Message: Re: MySQL search query is not executing in Postgres DB

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/backend/parser/parse_func.c 0 0
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 2b1a13a..feac9f9 100644
*** a/src/backend/parser/parse_func.c
--- b/src/backend/parser/parse_func.c
*************** func_match_argtypes(int nargs,
*** 555,560 ****
--- 555,578 ----
  		}
  	}
  
+ 	if (ncandidates == 0)
+ 	{
+ 		/* try again with assignment rules */
+ 		for (current_candidate = raw_candidates;
+ 			 current_candidate != NULL;
+ 			 current_candidate = next_candidate)
+ 		{
+ 			next_candidate = current_candidate->next;
+ 			if (can_coerce_type(nargs, input_typeids, current_candidate->args,
+ 								COERCION_ASSIGNMENT))
+ 			{
+ 				current_candidate->next = *candidates;
+ 				*candidates = current_candidate;
+ 				ncandidates++;
+ 			}
+ 		}
+ 	}
+ 
  	return ncandidates;
  }	/* func_match_argtypes() */