Skip to content

Commit 1084866

Browse files
committed
move version check to correct code branch
1 parent 463dbfd commit 1084866

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/rumutil.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,11 +253,6 @@ initRumState(RumState * state, Relation index)
253253
*/
254254
if (index_getprocid(index, i + 1, GIN_COMPARE_PROC) != InvalidOid)
255255
{
256-
#if PG_VERSION_NUM < 100000
257-
ereport(ERROR,
258-
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
259-
errmsg("array indexing is only available on PostgreSQL 10+")));
260-
#endif
261256
fmgr_info_copy(&(state->compareFn[i]),
262257
index_getprocinfo(index, i + 1, GIN_COMPARE_PROC),
263258
CurrentMemoryContext);
@@ -266,6 +261,12 @@ initRumState(RumState * state, Relation index)
266261
{
267262
TypeCacheEntry *typentry;
268263

264+
#if PG_VERSION_NUM < 100000
265+
ereport(ERROR,
266+
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
267+
errmsg("array indexing is only available on PostgreSQL 10+")));
268+
#endif
269+
269270
typentry = lookup_type_cache(origTupdesc->attrs[i]->atttypid,
270271
TYPECACHE_CMP_PROC_FINFO);
271272
if (!OidIsValid(typentry->cmp_proc_finfo.fn_oid))

0 commit comments

Comments
 (0)