*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.164 2008/03/25 22:42:44 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/varlena.c,v 1.165 2008/04/12 23:21:04 tgl Exp $
*
*-------------------------------------------------------------------------
*/
* If we're working with an untoasted source, no need to do an extra
* copying step.
*/
- if (VARATT_IS_COMPRESSED(str) || VARATT_IS_EXTERNAL(str))
+ if (VARATT_IS_COMPRESSED(DatumGetPointer(str)) ||
+ VARATT_IS_EXTERNAL(DatumGetPointer(str)))
slice = DatumGetTextPSlice(str, slice_start, slice_size);
else
slice = (text *) DatumGetPointer(str);
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
*
- * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.69 2008/01/09 23:43:54 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/mb/mbutils.c,v 1.70 2008/04/12 23:21:04 tgl Exp $
*/
#include "postgres.h"
result = DirectFunctionCall3(pg_convert, string,
src_encoding_name, dest_encoding_name);
- PG_RETURN_BYTEA_P(result);
+ PG_RETURN_DATUM(result);
}
/*
* in this case it will be because we've told pg_convert to return one
* that is valid as text in the current database encoding.
*/
- PG_RETURN_TEXT_P(result);
+ PG_RETURN_DATUM(result);
}
/*