1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

Temporarily revert "Move pg_lzcompress.c to src/common."

This reverts commit 60838df922.
That change needs a bit more thought to be workable.  In view of
the potentially machine-dependent stuff that went in today,
we need all of the buildfarm to be testing those other changes.
This commit is contained in:
Tom Lane
2014-12-25 13:22:55 -05:00
parent d72731a704
commit 966115c305
6 changed files with 17 additions and 29 deletions

View File

@ -37,7 +37,7 @@
#include "catalog/catalog.h"
#include "miscadmin.h"
#include "utils/fmgroids.h"
#include "common/pg_lzcompress.h"
#include "utils/pg_lzcompress.h"
#include "utils/rel.h"
#include "utils/typcache.h"
#include "utils/tqual.h"
@ -142,8 +142,7 @@ heap_tuple_untoast_attr(struct varlena * attr)
attr = (struct varlena *) palloc(PGLZ_RAW_SIZE(tmp) + VARHDRSZ);
SET_VARSIZE(attr, PGLZ_RAW_SIZE(tmp) + VARHDRSZ);
if (!pglz_decompress(tmp, VARDATA(attr)))
elog(ERROR, "compressed data is corrupted");
pglz_decompress(tmp, VARDATA(attr));
pfree(tmp);
}
}
@ -168,8 +167,7 @@ heap_tuple_untoast_attr(struct varlena * attr)
attr = (struct varlena *) palloc(PGLZ_RAW_SIZE(tmp) + VARHDRSZ);
SET_VARSIZE(attr, PGLZ_RAW_SIZE(tmp) + VARHDRSZ);
if (!pglz_decompress(tmp, VARDATA(attr)))
elog(ERROR, "compressed data is corrupted");
pglz_decompress(tmp, VARDATA(attr));
}
else if (VARATT_IS_SHORT(attr))
{
@ -241,8 +239,7 @@ heap_tuple_untoast_attr_slice(struct varlena * attr,
preslice = (struct varlena *) palloc(size);
SET_VARSIZE(preslice, size);
if (!pglz_decompress(tmp, VARDATA(preslice)))
elog(ERROR, "compressed data is corrupted");
pglz_decompress(tmp, VARDATA(preslice));
if (tmp != (PGLZ_Header *) attr)
pfree(tmp);