aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/pg_lzcompress.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-04-06 04:21:44 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-04-06 04:21:44 +0000
commit3e23b68dac006e8deb0afa327e855258df8de064 (patch)
treef5a555955dd954265dea1107e08dadd917714551 /src/backend/utils/adt/pg_lzcompress.c
parentd44163953c2ce74d6db9d9807e030a0a3b725da5 (diff)
downloadpostgresql-3e23b68dac006e8deb0afa327e855258df8de064.tar.gz
postgresql-3e23b68dac006e8deb0afa327e855258df8de064.zip
Support varlena fields with single-byte headers and unaligned storage.
This commit breaks any code that assumes that the mere act of forming a tuple (without writing it to disk) does not "toast" any fields. While all available regression tests pass, I'm not totally sure that we've fixed every nook and cranny, especially in contrib. Greg Stark with some help from Tom Lane
Diffstat (limited to 'src/backend/utils/adt/pg_lzcompress.c')
-rw-r--r--src/backend/utils/adt/pg_lzcompress.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/pg_lzcompress.c b/src/backend/utils/adt/pg_lzcompress.c
index c756e5707a5..085bc63e0dd 100644
--- a/src/backend/utils/adt/pg_lzcompress.c
+++ b/src/backend/utils/adt/pg_lzcompress.c
@@ -166,7 +166,7 @@
*
* Copyright (c) 1999-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/utils/adt/pg_lzcompress.c,v 1.25 2007/02/27 23:48:08 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/pg_lzcompress.c,v 1.26 2007/04/06 04:21:43 tgl Exp $
* ----------
*/
#include "postgres.h"
@@ -618,7 +618,7 @@ pglz_compress(const char *source, int32 slen, PGLZ_Header *dest,
/*
* Success - need only fill in the actual length of the compressed datum.
*/
- SET_VARSIZE(dest, result_size + sizeof(PGLZ_Header));
+ SET_VARSIZE_COMPRESSED(dest, result_size + sizeof(PGLZ_Header));
return true;
}