summaryrefslogtreecommitdiff
path: root/src/pl/plpgsql
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-05-30 04:25:00 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-05-30 04:25:00 +0000
commit0f1e39643de655f5103b09d5a82cadbf26a965c1 (patch)
tree32fa30338e5065afbc28df7dae4c2d2a0bce1569 /src/pl/plpgsql
parenta12a23f0d03cc8bf22c6c38bc2394753ec34fcdf (diff)
downloadpostgresql-0f1e39643de655f5103b09d5a82cadbf26a965c1.tar.gz
Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
Diffstat (limited to 'src/pl/plpgsql')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index e587aecba6..77370801c9 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.22 2000/05/28 17:56:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.23 2000/05/30 04:24:58 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -1566,10 +1566,10 @@ exec_stmt_raise(PLpgSQL_execstate * estate, PLpgSQL_stmt_raise * stmt)
typeStruct = (Form_pg_type) GETSTRUCT(typetup);
fmgr_info(typeStruct->typoutput, &finfo_output);
- extval = (char *) (*fmgr_faddr(&finfo_output))
- (var->value,
- typeStruct->typelem,
- var->datatype->atttypmod);
+ extval = DatumGetCString(FunctionCall3(&finfo_output,
+ var->value,
+ ObjectIdGetDatum(typeStruct->typelem),
+ Int32GetDatum(var->datatype->atttypmod)));
}
plpgsql_dstring_append(&ds, extval);
break;
@@ -2414,13 +2414,14 @@ exec_cast_value(Datum value, Oid valtype,
typeStruct = (Form_pg_type) GETSTRUCT(typetup);
fmgr_info(typeStruct->typoutput, &finfo_output);
- extval = (char *) (*fmgr_faddr(&finfo_output))
- (value,
- typeStruct->typelem,
- -1);
- value = (Datum) (*fmgr_faddr(reqinput)) (extval,
- reqtypelem,
- reqtypmod);
+ extval = DatumGetCString(FunctionCall3(&finfo_output,
+ value,
+ ObjectIdGetDatum(typeStruct->typelem),
+ Int32GetDatum(-1)));
+ value = FunctionCall3(reqinput,
+ CStringGetDatum(extval),
+ ObjectIdGetDatum(reqtypelem),
+ Int32GetDatum(reqtypmod));
pfree(extval);
}
}