From 8ecac94bb21570ee45245f440171b5ffb4efe68c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 6 Jul 2000 05:48:31 +0000 Subject: Functions on 'text' type updated to new fmgr style. 'text' is now TOAST-able. --- src/backend/utils/adt/lztext.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/backend/utils/adt/lztext.c') diff --git a/src/backend/utils/adt/lztext.c b/src/backend/utils/adt/lztext.c index 694940a8570..e1f80f63dac 100644 --- a/src/backend/utils/adt/lztext.c +++ b/src/backend/utils/adt/lztext.c @@ -1,7 +1,7 @@ /* ---------- * lztext.c - * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/lztext.c,v 1.9 2000/07/05 10:09:53 wieck Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/lztext.c,v 1.10 2000/07/06 05:48:11 tgl Exp $ * * Text type with internal LZ compressed representation. Uses the * standard PostgreSQL compression method. @@ -174,19 +174,13 @@ lztextoctetlen(lztext *lz) * Convert text to lztext * ---------- */ -lztext * -text_lztext(text *txt) +Datum +text_lztext(PG_FUNCTION_ARGS) { + text *txt = PG_GETARG_TEXT_P(0); lztext *result; int32 rawsize; - /* ---------- - * Handle NULL - * ---------- - */ - if (txt == NULL) - return NULL; - /* ---------- * Copy the entire attribute * ---------- @@ -196,7 +190,7 @@ text_lztext(text *txt) VARATT_SIZEP(result) = rawsize + VARHDRSZ; memcpy(VARATT_DATA(result), VARATT_DATA(txt), rawsize); - return result; + PG_RETURN_POINTER(result); } -- cgit v1.2.3