diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-05 23:12:09 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-07-05 23:12:09 +0000 |
commit | 40f64064ff56c3118d156ba83df72b1779415a8a (patch) | |
tree | d318bf6c8e6e85a15d2cd6e997ee02bf233dd181 /src/backend/utils/cache/fcache.c | |
parent | 282713a836d5dfe3dcefeaa6a6cedf5f000bdb09 (diff) |
Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
Diffstat (limited to 'src/backend/utils/cache/fcache.c')
-rw-r--r-- | src/backend/utils/cache/fcache.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/utils/cache/fcache.c b/src/backend/utils/cache/fcache.c index 867de40baa9..7e9d18c7e27 100644 --- a/src/backend/utils/cache/fcache.c +++ b/src/backend/utils/cache/fcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.32 2000/06/06 17:44:25 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.33 2000/07/05 23:11:39 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -70,7 +70,7 @@ init_fcache(Oid foid, Form_pg_type typeStruct; FunctionCachePtr retval; int nargs; - text *tmp; + Datum tmp; bool isNull; retval = (FunctionCachePtr) palloc(sizeof(FunctionCache)); @@ -212,14 +212,14 @@ init_fcache(Oid foid, if (procedureStruct->prolang == SQLlanguageId) { - tmp = (text *) SysCacheGetAttr(PROCOID, - procedureTuple, - Anum_pg_proc_prosrc, - &isNull); + tmp = SysCacheGetAttr(PROCOID, + procedureTuple, + Anum_pg_proc_prosrc, + &isNull); if (isNull) elog(ERROR, "init_fcache: null prosrc for procedure %u", foid); - retval->src = textout(tmp); + retval->src = DatumGetCString(DirectFunctionCall1(textout, tmp)); retval->bin = (char *) NULL; } else @@ -229,14 +229,14 @@ init_fcache(Oid foid, retval->bin = (char *) NULL; else { - tmp = (text *) SysCacheGetAttr(PROCOID, - procedureTuple, - Anum_pg_proc_probin, - &isNull); + tmp = SysCacheGetAttr(PROCOID, + procedureTuple, + Anum_pg_proc_probin, + &isNull); if (isNull) elog(ERROR, "init_fcache: null probin for procedure %u", foid); - retval->bin = textout(tmp); + retval->bin = DatumGetCString(DirectFunctionCall1(textout, tmp)); } } |