diff --git a/sql/pgpool-recovery/pgpool-recovery.c b/sql/pgpool-recovery/pgpool-recovery.c index 8408e3f..a981bf9 100644 --- a/sql/pgpool-recovery/pgpool-recovery.c +++ b/sql/pgpool-recovery/pgpool-recovery.c @@ -198,7 +198,14 @@ get_function_oid(const char *funcname, const char *argtype, const char *nspname) oid_v = buildoidvector(NULL, 0); } +#if !defined(PG_VERSION_NUM) || (PG_VERSION_NUM < 90300) nspid = LookupExplicitNamespace(nspname); +#else + /* LookupExplicitNamespace() of PostgreSQL 9.3 or later, has third + * argument "missing_ok" which suppresses ERROR exception, but + * returns invlaid_oid. See include/catalog/namespace.h */ + nspid = LookupExplicitNamespace(nspname, false); +#endif elog(DEBUG1, "get_function_oid: oid of \"%s\": %d", nspname, nspid); tup = SearchSysCache(PROCNAMEARGSNSP,