From 58de480999da65ec0fbf256f17800cba89e26dd5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 25 Aug 2002 17:20:01 +0000 Subject: Clean up comments to be careful about the distinction between variable- width types and varlena types, since with the introduction of CSTRING as a more-or-less-real type, these concepts aren't identical. I've tried to use varlena consistently to denote datatypes with typlen = -1, ie, they have a length word and are potentially TOASTable; while the term variable width covers both varlena and cstring (and, perhaps, someday other types with other rules for computing the actual width). No code changes in this commit except for renaming a couple macros. --- src/backend/libpq/be-fsstubs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/backend/libpq/be-fsstubs.c') diff --git a/src/backend/libpq/be-fsstubs.c b/src/backend/libpq/be-fsstubs.c index fe31d78d399..8f778f1de78 100644 --- a/src/backend/libpq/be-fsstubs.c +++ b/src/backend/libpq/be-fsstubs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.61 2002/06/20 20:29:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.62 2002/08/25 17:20:01 tgl Exp $ * * NOTES * This should be moved to a more appropriate place. It is here @@ -313,24 +313,24 @@ loread(PG_FUNCTION_ARGS) { int32 fd = PG_GETARG_INT32(0); int32 len = PG_GETARG_INT32(1); - struct varlena *retval; + bytea *retval; int totalread; if (len < 0) len = 0; - retval = (struct varlena *) palloc(VARHDRSZ + len); + retval = (bytea *) palloc(VARHDRSZ + len); totalread = lo_read(fd, VARDATA(retval), len); VARATT_SIZEP(retval) = totalread + VARHDRSZ; - PG_RETURN_POINTER(retval); + PG_RETURN_BYTEA_P(retval); } Datum lowrite(PG_FUNCTION_ARGS) { int32 fd = PG_GETARG_INT32(0); - struct varlena *wbuf = PG_GETARG_VARLENA_P(1); + bytea *wbuf = PG_GETARG_BYTEA_P(1); int bytestowrite; int totalwritten; -- cgit v1.2.3