Skip to content

Commit badb572

Browse files
committed
Improve PostgreSQL version check
1 parent ab55c86 commit badb572

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

imgsmlr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include "postgres.h"
16-
#ifndef VARDATA_ANY
16+
#ifdef PG_VERSION_NUM
17+
#if PG_VERSION_NUM >= 160000
1718
#include "varatt.h"
1819
#endif
20+
#endif
1921

2022
#include "c.h"
2123
#include "fmgr.h"

imgsmlr_idx.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include "postgres.h"
16-
#ifndef VARDATA_ANY
16+
17+
#ifdef PG_VERSION_NUM
18+
#if PG_VERSION_NUM >= 160000
1719
#include "varatt.h"
1820
#endif
21+
#endif
1922

2023
#include "fmgr.h"
2124
#include "imgsmlr.h"

0 commit comments

Comments
 (0)