Tom Lane wrote:
> Yeah, I think we could get away with that. It might be appropriate to
> put that single special case into IsBinaryCoercible, instead of allowing
> it only for the compatible_oper case. I can't recall offhand what else
> uses IsBinaryCoercible ...
>
OK -- here is that version. Certainly simplifies it, and seems
appropriate given the comments in IsBinaryCoercible.
Next question: should I roll the three array related patches floating
around (phase2, phase3, polycoerce) into one big patch again? It's
difficult for me to continue to make progress without doing that.
Joe
Index: src/backend/parser/parse_coerce.c
===================================================================
RCS file: /opt/src/cvs/pgsql-server/src/backend/parser/parse_coerce.c,v
retrieving revision 2.97
diff -c -r2.97 parse_coerce.c
*** src/backend/parser/parse_coerce.c 26 May 2003 00:11:27 -0000 2.97
--- src/backend/parser/parse_coerce.c 1 Jun 2003 16:15:40 -0000
***************
*** 1169,1174 ****
--- 1177,1187 ----
/* Somewhat-fast path for domain -> base type case */
if (srctype == targettype)
return true;
+
+ /* Last of the fast-paths: check for matching polymorphic arrays */
+ if (targettype == ANYARRAYOID)
+ if (get_element_type(srctype) != InvalidOid)
+ return true;
/* Else look in pg_cast */
tuple = SearchSysCache(CASTSOURCETARGET,