From 5e48cf02f96a194240138540a1c2c1e96de8b9ba Mon Sep 17 00:00:00 2001 From: Masahiko Sakamoto Date: Thu, 20 Sep 2012 03:48:53 +0000 Subject: [PATCH] Fixes to work with 9.3dev. - included "access/htup_details.h", a newly introduced header for tuple. - included "lib/stringinfo.h". reported by josh. --- lib/pgut/pgut-spi.c | 1 + lib/reorg.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/pgut/pgut-spi.c b/lib/pgut/pgut-spi.c index 29be13c..db117fe 100755 --- a/lib/pgut/pgut-spi.c +++ b/lib/pgut/pgut-spi.c @@ -8,6 +8,7 @@ #include "postgres.h" #include "pgut-spi.h" +#include "lib/stringinfo.h" #define EXEC_FAILED(ret, expected) \ (((expected) > 0 && (ret) != (expected)) || (ret) < 0) diff --git a/lib/reorg.c b/lib/reorg.c index d2bb776..f187c77 100755 --- a/lib/reorg.c +++ b/lib/reorg.c @@ -30,6 +30,11 @@ #include "pgut/pgut-spi.h" #include "pgut/pgut-be.h" +/* htup.h was reorganized for 9.3, so now we need this header */ +#if PG_VERSION_NUM >= 90300 +#include "access/htup_details.h" +#endif + PG_MODULE_MAGIC; extern Datum PGUT_EXPORT reorg_version(PG_FUNCTION_ARGS); @@ -972,7 +977,11 @@ swap_heap_or_index_files(Oid r1, Oid r2) /* swap size statistics too, since new rel has freshly-updated stats */ { +#if PG_VERSION_NUM >= 90300 + int32 swap_pages; +#else int4 swap_pages; +#endif float4 swap_tuples; swap_pages = relform1->relpages;