File tree Expand file tree Collapse file tree 1 file changed +26
-24
lines changed
ebssurrogate/files/unit-tests Expand file tree Collapse file tree 1 file changed +26
-24
lines changed Original file line number Diff line number Diff line change 55DECLARE
66 extension_array text [];
77 orioledb_available boolean ;
8+ pgcrypto_available boolean ;
89BEGIN
910 -- Check if orioledb is available
1011 SELECT EXISTS (
1112 SELECT 1 FROM pg_available_extensions WHERE name = ' orioledb'
1213 ) INTO orioledb_available;
13-
14- -- If available, create it and add to the expected extensions list
14+
15+ -- Check if pgcrypto is available
16+ SELECT EXISTS (
17+ SELECT 1 FROM pg_available_extensions WHERE name = ' pgcrypto'
18+ ) INTO pgcrypto_available;
19+
20+ -- Initialize base extension array
21+ extension_array := ARRAY[
22+ ' plpgsql' ,
23+ ' pg_stat_statements' ,
24+ ' pgtap' ,
25+ ' pg_graphql' ,
26+ ' pgjwt' ,
27+ ' uuid-ossp' ,
28+ ' supabase_vault'
29+ ];
30+
31+ -- If orioledb is available, add it
1532 IF orioledb_available THEN
1633 CREATE EXTENSION IF NOT EXISTS orioledb;
17- extension_array := ARRAY[
18- ' plpgsql' ,
19- ' pg_stat_statements' ,
20- ' pgtap' ,
21- ' pg_graphql' ,
22- ' pgcrypto' ,
23- ' pgjwt' ,
24- ' uuid-ossp' ,
25- ' supabase_vault' ,
26- ' orioledb'
27- ];
28- ELSE
29- extension_array := ARRAY[
30- ' plpgsql' ,
31- ' pg_stat_statements' ,
32- ' pgtap' ,
33- ' pg_graphql' ,
34- ' pgcrypto' ,
35- ' pgjwt' ,
36- ' uuid-ossp' ,
37- ' supabase_vault'
38- ];
34+ extension_array := array_append(extension_array, ' orioledb' );
35+ END IF;
36+
37+ -- If pgcrypto is available, add it
38+ IF pgcrypto_available THEN
39+ CREATE EXTENSION IF NOT EXISTS pgcrypto;
40+ extension_array := array_append(extension_array, ' pgcrypto' );
3941 END IF;
4042
4143 -- Set the array as a temporary variable to use in the test
You can’t perform that action at this time.
0 commit comments