Skip to content

Commit 5534357

Browse files
authored
Merge pull request #77 from citusdata/pg12
Postgres 12 support
2 parents f19255f + 4fb5a97 commit 5534357

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/hll.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@
3131
#include <stdlib.h>
3232
#include <string.h>
3333
#include <inttypes.h>
34+
#if PG_VERSION_NUM >= 120000
35+
#include "access/genam.h"
36+
#include "access/heapam.h"
37+
#endif
3438
#include "access/sysattr.h"
3539
#include "access/htup_details.h"
3640
#include "commands/extension.h"
@@ -56,7 +60,11 @@
5660
#include "lib/stringinfo.h"
5761
#include "libpq/pqformat.h"
5862
#include "nodes/print.h"
63+
#if PG_VERSION_NUM >= 120000
64+
#include "optimizer/optimizer.h"
65+
#else
5966
#include "optimizer/var.h"
67+
#endif
6068
#include "miscadmin.h"
6169

6270
#include "MurmurHash3.h"
@@ -275,7 +283,11 @@ get_extension_schema(Oid ext_oid)
275283
rel = heap_open(ExtensionRelationId, AccessShareLock);
276284

277285
ScanKeyInit(&entry[0],
286+
#if PG_VERSION_NUM >= 120000
287+
Anum_pg_extension_oid,
288+
#else
278289
ObjectIdAttributeNumber,
290+
#endif
279291
BTEqualStrategyNumber, F_OIDEQ,
280292
ObjectIdGetDatum(ext_oid));
281293

0 commit comments

Comments
 (0)