@@ -83,13 +83,25 @@ _PG_init(void)
8383
8484 add_string_reloption (rum_relopt_kind , "attach" ,
8585 "Column name to attach as additional info" ,
86- NULL , NULL );
86+ NULL , NULL
87+ #if PG_VERSION_NUM >= 130000
88+ , AccessExclusiveLock
89+ #endif
90+ );
8791 add_string_reloption (rum_relopt_kind , "to" ,
8892 "Column name to add a order by column" ,
89- NULL , NULL );
93+ NULL , NULL
94+ #if PG_VERSION_NUM >= 130000
95+ , AccessExclusiveLock
96+ #endif
97+ );
9098 add_bool_reloption (rum_relopt_kind , "order_by_attach" ,
9199 "Use (addinfo, itempointer) order instead of just itempointer" ,
92- false);
100+ false
101+ #if PG_VERSION_NUM >= 130000
102+ , AccessExclusiveLock
103+ #endif
104+ );
93105}
94106
95107/*
@@ -875,14 +887,15 @@ rumExtractEntries(RumState * rumstate, OffsetNumber attnum,
875887bytea *
876888rumoptions (Datum reloptions , bool validate )
877889{
878- relopt_value * options ;
879- RumOptions * rdopts ;
880- int numoptions ;
881890 static const relopt_parse_elt tab [] = {
882891 {"attach" , RELOPT_TYPE_STRING , offsetof(RumOptions , attachColumn )},
883892 {"to" , RELOPT_TYPE_STRING , offsetof(RumOptions , addToColumn )},
884893 {"order_by_attach" , RELOPT_TYPE_BOOL , offsetof(RumOptions , useAlternativeOrder )}
885894 };
895+ #if PG_VERSION_NUM < 130000
896+ relopt_value * options ;
897+ RumOptions * rdopts ;
898+ int numoptions ;
886899
887900 options = parseRelOptions (reloptions , validate , rum_relopt_kind ,
888901 & numoptions );
@@ -899,6 +912,10 @@ rumoptions(Datum reloptions, bool validate)
899912 pfree (options );
900913
901914 return (bytea * ) rdopts ;
915+ #else
916+ return (bytea * ) build_reloptions (reloptions , validate , rum_relopt_kind ,
917+ sizeof (RumOptions ), tab , lengthof (tab ));
918+ #endif
902919}
903920
904921bool
0 commit comments