1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Function-call-style type coercions should be treated as explicit

coercions, not implicit ones.  For example, 'select abstime(1035497293)'
should succeed because there is an explicit binary coercion from int4
to abstime.
This commit is contained in:
Tom Lane
2002-10-24 22:09:00 +00:00
parent 6b704bf501
commit c3086c8f53
3 changed files with 15 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.84 2002/09/18 21:35:22 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.85 2002/10/24 22:09:00 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -32,9 +32,6 @@ static Node *coerce_type_typmod(Node *node,
Oid targetTypeId, int32 targetTypMod,
CoercionForm cformat);
static Oid PreferredType(CATEGORY category, Oid type);
static bool find_coercion_pathway(Oid targetTypeId, Oid sourceTypeId,
CoercionContext ccontext,
Oid *funcid);
static Node *build_func_call(Oid funcid, Oid rettype, List *args,
CoercionForm fformat);
@@ -910,7 +907,7 @@ IsBinaryCoercible(Oid srctype, Oid targettype)
* to the castfunc value (which may be InvalidOid for a binary-compatible
* coercion).
*/
static bool
bool
find_coercion_pathway(Oid targetTypeId, Oid sourceTypeId,
CoercionContext ccontext,
Oid *funcid)