From ecf0e9213f6f073fe058aa7618a84d0206d6bba5 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Tue, 10 Jul 2018 21:49:29 -0500 Subject: [PATCH] Remove array slice in allSynonyms query This is for ensuring compatibility with pg 9.4 which doesn't support omitting the array slice upper bound, [2:] gives an error. The query still works fine because the array slice was to avoid having a "({" result but this gets removed in the later join. --- src/PostgREST/DbStructure.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PostgREST/DbStructure.hs b/src/PostgREST/DbStructure.hs index 1256bac4c..61cef9553 100644 --- a/src/PostgREST/DbStructure.hs +++ b/src/PostgREST/DbStructure.hs @@ -726,7 +726,7 @@ allSynonyms cols = target_entries as( select view_schema, view_name, - unnest((regexp_split_to_array(x, 'TARGETENTRY'))[2:]) as entry + unnest(regexp_split_to_array(x, 'TARGETENTRY')) as entry from last_target_list_wo_tail ), results as(