mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Fix IsBinaryCoercible to not confuse a cast using in/out functions
with binary compatibility. Backpatch to 8.4 where INOUT casts were introduced.
This commit is contained in:
parent
0ea0afa444
commit
3bdede3974
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 */
|
return false; /* no cast */
|
||||||
castForm = (Form_pg_cast) GETSTRUCT(tuple);
|
castForm = (Form_pg_cast) GETSTRUCT(tuple);
|
||||||
|
|
||||||
result = (castForm->castfunc == InvalidOid &&
|
result = (castForm->castmethod == COERCION_METHOD_BINARY &&
|
||||||
castForm->castcontext == COERCION_CODE_IMPLICIT);
|
castForm->castcontext == COERCION_CODE_IMPLICIT);
|
||||||
|
|
||||||
ReleaseSysCache(tuple);
|
ReleaseSysCache(tuple);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user