1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Revise parse_coerce() to handle coercion of int and float

constants, not only string constants, at parse time.  Get rid of
parser_typecast2(), which is bogus and redundant...
This commit is contained in:
Tom Lane
1999-08-05 02:33:54 +00:00
parent 5a76a94e41
commit fd19a350ea
6 changed files with 118 additions and 243 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.50 1999/07/17 20:17:24 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.51 1999/08/05 02:33:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -1278,21 +1278,8 @@ make_arguments(ParseState *pstate,
i < nargs;
i++, current_fargs = lnext(current_fargs))
{
/*
* unspecified type for string constant? then use heuristics for
* conversion...
*/
if (input_typeids[i] == UNKNOWNOID && function_typeids[i] != InvalidOid)
{
lfirst(current_fargs) = parser_typecast2(lfirst(current_fargs),
input_typeids[i],
typeidType(function_typeids[i]),
-1);
}
/* types don't match? then force coersion using a function call... */
else if (input_typeids[i] != function_typeids[i])
if (input_typeids[i] != function_typeids[i])
{
lfirst(current_fargs) = coerce_type(pstate,
lfirst(current_fargs),