33 * procedural language
44 *
55 * IDENTIFICATION
6- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.12 1999/07/04 01:03:01 tgl Exp $
6+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.12.2.1 2000/01/16 00:45:33 tgl Exp $
77 *
88 * This software is copyrighted by Jan Wieck - Hamburg.
99 *
@@ -130,7 +130,7 @@ static void exec_move_row(PLpgSQL_execstate * estate,
130130static Datum exec_cast_value (Datum value ,Oid valtype ,
131131Oid reqtype ,
132132FmgrInfo * reqinput ,
133- int16 reqtypmod ,
133+ int32 reqtypmod ,
134134bool * isnull );
135135static void exec_set_found (PLpgSQL_execstate * estate ,bool state );
136136
@@ -1561,7 +1561,7 @@ exec_stmt_raise(PLpgSQL_execstate * estate, PLpgSQL_stmt_raise * stmt)
15611561typeStruct = (Form_pg_type )GETSTRUCT (typetup );
15621562
15631563fmgr_info (typeStruct -> typoutput ,& finfo_output );
1564- extval = (char * ) (* fmgr_faddr (& finfo_output )) (var -> value ,& ( var -> isnull ) ,var -> datatype -> atttypmod );
1564+ extval = (char * ) (* fmgr_faddr (& finfo_output )) (var -> value ,InvalidOid ,var -> datatype -> atttypmod );
15651565}
15661566plpgsql_dstring_append (& ds ,extval );
15671567break ;
@@ -1874,7 +1874,7 @@ exec_assign_value(PLpgSQL_execstate * estate,
18741874char * nulls ;
18751875bool attisnull ;
18761876Oid atttype ;
1877- int4 atttypmod ;
1877+ int32 atttypmod ;
18781878HeapTuple typetup ;
18791879Form_pg_type typeStruct ;
18801880FmgrInfo finfo_input ;
@@ -2373,7 +2373,7 @@ static Datum
23732373exec_cast_value (Datum value ,Oid valtype ,
23742374Oid reqtype ,
23752375FmgrInfo * reqinput ,
2376- int16 reqtypmod ,
2376+ int32 reqtypmod ,
23772377bool * isnull )
23782378{
23792379if (!* isnull )
@@ -2383,7 +2383,7 @@ exec_cast_value(Datum value, Oid valtype,
23832383 * that of the variable, convert it.
23842384 * ----------
23852385 */
2386- if (valtype != reqtype || reqtypmod > 0 )
2386+ if (valtype != reqtype || reqtypmod != -1 )
23872387{
23882388HeapTuple typetup ;
23892389Form_pg_type typeStruct ;
@@ -2397,8 +2397,8 @@ exec_cast_value(Datum value, Oid valtype,
23972397typeStruct = (Form_pg_type )GETSTRUCT (typetup );
23982398
23992399fmgr_info (typeStruct -> typoutput ,& finfo_output );
2400- extval = (char * ) (* fmgr_faddr (& finfo_output )) (value ,& isnull ,-1 );
2401- value = (Datum ) (* fmgr_faddr (reqinput )) (extval ,& isnull ,reqtypmod );
2400+ extval = (char * ) (* fmgr_faddr (& finfo_output )) (value ,InvalidOid ,-1 );
2401+ value = (Datum ) (* fmgr_faddr (reqinput )) (extval ,InvalidOid ,reqtypmod );
24022402}
24032403}
24042404