Skip to content

Commit 5e48cf0

Browse files
author
Masahiko Sakamoto
committed
Fixes to work with 9.3dev.
- included "access/htup_details.h", a newly introduced header for tuple. - included "lib/stringinfo.h". reported by josh.
1 parent f2fed24 commit 5e48cf0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/pgut/pgut-spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include "postgres.h"
1010
#include "pgut-spi.h"
11+
#include "lib/stringinfo.h"
1112

1213
#define EXEC_FAILED(ret, expected) \
1314
(((expected) > 0 && (ret) != (expected)) || (ret) < 0)

lib/reorg.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
#include "pgut/pgut-spi.h"
3131
#include "pgut/pgut-be.h"
3232

33+
/* htup.h was reorganized for 9.3, so now we need this header */
34+
#if PG_VERSION_NUM >= 90300
35+
#include "access/htup_details.h"
36+
#endif
37+
3338
PG_MODULE_MAGIC;
3439

3540
extern Datum PGUT_EXPORT reorg_version(PG_FUNCTION_ARGS);
@@ -972,7 +977,11 @@ swap_heap_or_index_files(Oid r1, Oid r2)
972977

973978
/* swap size statistics too, since new rel has freshly-updated stats */
974979
{
980+
#if PG_VERSION_NUM >= 90300
981+
int32 swap_pages;
982+
#else
975983
int4 swap_pages;
984+
#endif
976985
float4 swap_tuples;
977986

978987
swap_pages = relform1->relpages;

0 commit comments

Comments
 (0)