From 1a65213a9458e1640ff6b9dcc42b95052cfe8dbf Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Tue, 3 Oct 2017 12:33:50 +0200 Subject: [PATCH] Also fix hypo_can_return for pg9.6+ --- hypopg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hypopg.c b/hypopg.c index cbd3ae1..93c692e 100644 --- a/hypopg.c +++ b/hypopg.c @@ -2086,8 +2086,13 @@ static bool hypo_can_return(hypoEntry *entry, Oid atttype, int i, char *amname) { /* no amcanreturn entry, am does not handle IOS */ - if (!OidIsValid(entry->amcanreturn)) +#if PG_VERSION_NUM >= 90600 + if (entry->amcanreturn == NULL) return false; +#else + if (!RegProcedureIsValid(entry->amcanreturn)) + return false; +#endif switch (entry->relam) {