]> granicus.if.org Git - postgresql/commitdiff
Fix IsBinaryCoercible to not confuse a cast using in/out functions
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 4 Mar 2010 09:40:01 +0000 (09:40 +0000)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 4 Mar 2010 09:40:01 +0000 (09:40 +0000)
with binary compatibility.

Backpatch to 8.4 where INOUT casts were introduced.

src/backend/parser/parse_coerce.c

index 0aec4a850e26a36ce023aa1677b2e2361cb53a93..6a627a7cbe1677a6e6869b8560e0c22eac17b4cd 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.177 2009/06/11 14:49:00 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.177.2.1 2010/03/04 09:40:01 heikki Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -1843,7 +1843,7 @@ IsBinaryCoercible(Oid srctype, Oid targettype)
                return false;                   /* no cast */
        castForm = (Form_pg_cast) GETSTRUCT(tuple);
 
-       result = (castForm->castfunc == InvalidOid &&
+       result = (castForm->castmethod == COERCION_METHOD_BINARY &&
                          castForm->castcontext == COERCION_CODE_IMPLICIT);
 
        ReleaseSysCache(tuple);