aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-03-04 09:39:53 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2010-03-04 09:39:53 +0000
commit3bdede3974569fa18b0d0684c07a6305df2fca06 (patch)
treee481d2eb8f66431113879767b24ef8f63d4f834b /src
parent0ea0afa44452b617ce1259cff27b2a24247e8b8e (diff)
downloadpostgresql-3bdede3974569fa18b0d0684c07a6305df2fca06.tar.gz
postgresql-3bdede3974569fa18b0d0684c07a6305df2fca06.zip
Fix IsBinaryCoercible to not confuse a cast using in/out functions
with binary compatibility. Backpatch to 8.4 where INOUT casts were introduced.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/parse_coerce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index 2000dfb93a9..45d2c35fa6b 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.181 2010/02/26 02:00:52 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_coerce.c,v 2.182 2010/03/04 09:39:53 heikki Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1792,7 +1792,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);