3
3
* procedural language
4
4
*
5
5
* 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 $
7
7
*
8
8
* This software is copyrighted by Jan Wieck - Hamburg.
9
9
*
@@ -130,7 +130,7 @@ static void exec_move_row(PLpgSQL_execstate * estate,
130
130
static Datum exec_cast_value (Datum value , Oid valtype ,
131
131
Oid reqtype ,
132
132
FmgrInfo * reqinput ,
133
- int16 reqtypmod ,
133
+ int32 reqtypmod ,
134
134
bool * isnull );
135
135
static void exec_set_found (PLpgSQL_execstate * estate , bool state );
136
136
@@ -1561,7 +1561,7 @@ exec_stmt_raise(PLpgSQL_execstate * estate, PLpgSQL_stmt_raise * stmt)
1561
1561
typeStruct = (Form_pg_type ) GETSTRUCT (typetup );
1562
1562
1563
1563
fmgr_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 );
1565
1565
}
1566
1566
plpgsql_dstring_append (& ds , extval );
1567
1567
break ;
@@ -1874,7 +1874,7 @@ exec_assign_value(PLpgSQL_execstate * estate,
1874
1874
char * nulls ;
1875
1875
bool attisnull ;
1876
1876
Oid atttype ;
1877
- int4 atttypmod ;
1877
+ int32 atttypmod ;
1878
1878
HeapTuple typetup ;
1879
1879
Form_pg_type typeStruct ;
1880
1880
FmgrInfo finfo_input ;
@@ -2373,7 +2373,7 @@ static Datum
2373
2373
exec_cast_value (Datum value , Oid valtype ,
2374
2374
Oid reqtype ,
2375
2375
FmgrInfo * reqinput ,
2376
- int16 reqtypmod ,
2376
+ int32 reqtypmod ,
2377
2377
bool * isnull )
2378
2378
{
2379
2379
if (!* isnull )
@@ -2383,7 +2383,7 @@ exec_cast_value(Datum value, Oid valtype,
2383
2383
* that of the variable, convert it.
2384
2384
* ----------
2385
2385
*/
2386
- if (valtype != reqtype || reqtypmod > 0 )
2386
+ if (valtype != reqtype || reqtypmod != -1 )
2387
2387
{
2388
2388
HeapTuple typetup ;
2389
2389
Form_pg_type typeStruct ;
@@ -2397,8 +2397,8 @@ exec_cast_value(Datum value, Oid valtype,
2397
2397
typeStruct = (Form_pg_type ) GETSTRUCT (typetup );
2398
2398
2399
2399
fmgr_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 );
2402
2402
}
2403
2403
}
2404
2404
0 commit comments