summaryrefslogtreecommitdiff
path: root/src/veil_interface.sqs
blob: ea06d6fd092a1deee38bb71a4725ed727f83b70d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
/* ----------
 * veil_interface.sqs (or a file derived from it)
 *
 *      Source file from which veil--<version>.sql is generated using
 *	sed. 
 *
 *      Copyright (c) 2005 - 2011 Marc Munro
 *      Author:  Marc Munro
 *	License: BSD
 *
 * ----------
 */

create schema veil;
comment on schema veil is
'Schema containing all veil components.';

create table veil.veil_init_fns(
  fn_name	varchar not null,
  priority      integer not null
);

comment on table veil.veil_init_fns is
'Configuration table containing the names of functions, conforming to
the veil.veil_init() API, that veil_init() should call to initialise or
reset veil variables.  The calls will be performed in priority order.

Note that other veil extensions are expected to create inherited chldren
of this table, so that their init functions will be called and when the
extension is dropped, the functions will no longer be visible to
veil.veil_init().';

select pg_catalog.pg_extension_config_dump('veil.veil_init_fns', '');

create type veil.veil_range_t as (
    min  int8,
    max  int8
);
comment on type veil.veil_range_t is
'Veil type used to record ranges.  A range is a pair of integers identifying
the minimum and maximum values of the range.  Ranges are used to
constrain the size of a bitmap or bitmap array.';

create type veil.veil_variable_t as (
    name    text,
    type    text,
    shared  bool
);
comment on type veil.veil_variable_t is
'Veil type used as the result type of veil_variables(), to describe each
variable known to a veil instance.';


create or replace
function veil.share(name text) returns bool
     as '@LIBPATH@', 'veil_share'
     language C stable strict;

comment on function veil.share(name text) is
'Create a shared variable named NAME.

Return TRUE if successful, else raise an error.

Create a veil variable as a shared variable.  Variables are named
containers for various types of values.  They are referenced by name,
passing the name as a string to the various veil functions.

Variables may be shared variables in which case they are available, with
the same value, to all sessions, or session variables in which case each
session will have its own instance.  Variables are by default created as
session variables, and are created by assignment, or initialisation.  To
create a shared variable, call veil_share() with the name of the
variable you wish to create, then create and use the variable as you
would a session variable.  Shared variables should only be created and
initialised from veil.veil_init() in order to prevent race conditions.
If a variable has already been created as a session variable, it cannot
be repurposed as a shared variable.';


create or replace
function veil.veil_variables() returns setof veil.veil_variable_t
     as '@LIBPATH@', 'veil_variables'
     language C stable;

comment on function veil.veil_variables() is
'List all current veil_variables.
Return a set of veil_variable_t results, detailing each existant
variable

This is intended for interactive use for debugging purposes.';


create or replace
function veil.init_range(name text, min int, max int) returns int
     as '@LIBPATH@', 'veil_init_range'
     language C stable strict;

comment on function veil.init_range(text, int, int) is
'Initialise a Range variable called NAME constrained by MIN and MAX.

Return the number of  elements in the range.

Ranges may be examined using the veil_range() function.';


create or replace
function veil.range(name text) returns veil.veil_range_t
     as '@LIBPATH@', 'veil_range'
     language C stable strict;

comment on function veil.range(name text) is
'Return the range for range variable NAME.';


create or replace
function veil.init_bitmap(bitmap_name text, range_name text) returns bool
     as '@LIBPATH@', 'veil_init_bitmap'
     language C stable strict;

comment on function veil.init_bitmap(text, text) is
'Create or re-initialise the Bitmap named BITMAP_NAME, for the range of
bits given by RANGE_NAME.

Return TRUE on success, raise an error otherwise.

All bits in the bitmap will be zero (cleared).';


create or replace
function veil.clear_bitmap(bitmap_name text) returns bool
     as '@LIBPATH@', 'veil_clear_bitmap'
     language C stable strict;

comment on function veil.clear_bitmap(text) is
'Clear the Bitmap or BitmapRef identified by BITMAP_NAME.

Return TRUE, or raise an error.

Clear (set to zero) all bits in the named bitmap.';


create or replace
function veil.bitmap_setbit(bitmap_name text, bit_number int) returns bool
     as '@LIBPATH@', 'veil_bitmap_setbit'
     language C stable strict;

comment on function veil.bitmap_setbit(text, int) is
'In the Bitmap or BitmapRef identified by BITMAP_NAME, set the bit given by
BIT_NUMBER.

Return TRUE or raise an error.

Set to 1, the identified bit.';


create or replace
function veil.bitmap_clearbit(bitmap_name text, bit_number int) returns bool
     as '@LIBPATH@', 'veil_bitmap_clearbit'
     language C stable strict;

comment on function veil.bitmap_clearbit(text, int) is
'In the Bitmap or BitmapRef identified by BITMAP_NAME, clear the bit given by
BIT_NUMBER.

Return TRUE or raise an error.

Set to 0, the identified bit.';


create or replace
function veil.bitmap_testbit(bitmap_name text, bit_number int) returns bool
     as '@LIBPATH@', 'veil_bitmap_testbit'
     language C stable strict;

comment on function veil.bitmap_testbit(text, int) is
'In the Bitmap or BitmapRef identified by BITMAP_NAME, test the bit given by
BIT_NUMBER.

Return TRUE if the bit is set, FALSE if it is zero.';


create or replace
function veil.bitmap_union(result_name text, bm2_name text) returns bool
     as '@LIBPATH@', 'veil_bitmap_union'
     language C stable strict;

comment on function veil.bitmap_union(text, text) is
'Union two Bitmaps, RESULT_NAME and BM2_NAME, with the result going into
the first.

Return TRUE, or raise an error.';


create or replace
function veil.bitmap_intersect(result_name text, bm2_name text) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_intersect'
     language C stable strict;

comment on function veil.bitmap_intersect(text, text) is
'Intersect two Bitmaps, RESULT_NAME and B<2_NAME, with the result going into
the first.

Return TRUE, or raise an error.';


create or replace
function veil.bitmap_bits(bitmap_name text) returns setof int
     as '@LIBPATH@', 'veil_bitmap_bits'
     language C stable strict;

comment on function veil.bitmap_bits(text) is
'Return each bit in the bitmap BITMAP_NAME.

This is primarily intended for interactive use for debugging, etc.';


create or replace
function veil.bitmap_range(bitmap_name text) returns veil.veil_range_t
     as '@LIBPATH@', 'veil_bitmap_range'
     language C stable strict;

comment on function veil.bitmap_range(text) is
'Return the range of bitmap BITMAP_NAME.  

It is primarily intended for interactive use.';



create or replace
function veil.init_bitmap_array(bmarray text, array_range text, 
	 			bitmap_range text) returns bool
     as '@LIBPATH@', 'veil_init_bitmap_array'
     language C stable strict;

comment on function veil.init_bitmap_array(text, text, text) is
'Creates or resets (clears) BMARRAY, to have ARRAY_RANGE bitmaps of
BITMAP_RANGE bits.

Returns TRUE or raises an error';


create or replace
function veil.clear_bitmap_array(bmarray text) returns bool
     as '@LIBPATH@', 'veil_clear_bitmap_array'
     language C stable strict;

comment on function veil.clear_bitmap_array(text) is
'Clear all bits in all bitmaps of bitmap array BMARRAY.

Return TRUE or raise an error';


create or replace
function veil.bitmap_from_array(bmref_name text, bmarray text, 
	 			index int) returns text
     as '@LIBPATH@', 
	'veil_bitmap_from_array'
     language C stable strict;

comment on function veil.bitmap_from_array(text, text, int) is
'Set BitmapRef BMREF_NAME to the bitmap from BMARRAY indexed by INDEX.

Return the name of the BitmapRef.

This is used to isolate a single bitmap from a bitmap array, recording
it in a BitmapRef.  That bitmap can then be manipulated by ordinary veil
bitmap functions.  Note that BitMapRefs can only be referenced within
the transaction they are defined.';


create or replace
function veil.bitmap_array_testbit(
    bmarray text, arr_idx int, bitno int) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_array_testbit'
     language C stable strict;

comment on function veil.bitmap_array_testbit(text, int, int) is
'Test a bit in BMARRAY, from the bitmap indexed by ARR_IDX, checking the
bit identified by BITNO.

Return TRUE if the bit is set, else FALSE';


create or replace
function veil.bitmap_array_setbit(
    bmarray text, arr_idx int, bitno int) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_array_setbit'
     language C stable strict;

comment on function veil.bitmap_array_setbit(text, int, int) is
'Set a bit in BMARRAY, from the bitmap indexed by ARR_IDX, setting the
bit identified by BITNO.

Return TRUE';


create or replace
function veil.bitmap_array_clearbit(
    bmarray text, arr_idx int, bitno int) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_array_clearbit'
     language C stable strict;

comment on function veil.bitmap_array_clearbit(text, int, int) is
'Clear a bit in BMARRAY, from the bitmap indexed by ARR_IDX, clearing the
bit identified by BITNO.

Return TRUE';


create or replace
function veil.union_from_bitmap_array(
    bitmap text, bmarray text, arr_idx int) returns bool
     as '@LIBPATH@', 
	'veil_union_from_bitmap_array'
     language C stable strict;

comment on function veil.union_from_bitmap_array(text, text, int) is
'Union BITMAP with BMARRAY[ARR_IDX], with the result going into bitmap.

Return TRUE';


create or replace
function veil.intersect_from_bitmap_array(
    bitmap text, bmarray text, arr_idx int) returns bool
     as '@LIBPATH@', 
	'veil_intersect_from_bitmap_array'
     language C stable strict;

comment on function veil.intersect_from_bitmap_array(text, text, int) is
'Intersect BITMAP with BMARRAY[ARR_IDX], with the result going into bitmap.

Return TRUE';


create or replace
function veil.bitmap_array_bits(bmarray text, arr_idx int) returns setof int4
     as '@LIBPATH@', 
	'veil_bitmap_array_bits'
     language C stable strict;

comment on function veil.bitmap_array_bits(text, int) is
'Return all bits in the bitmap given by BMARRAY[ARR_IDX].

This is primarily intended for interactive use: for debugging, etc.';


create or replace
function veil.bitmap_array_arange(bmarray text) returns veil.veil_range_t
     as '@LIBPATH@', 
	'veil_bitmap_array_arange'
     language C stable strict;

comment on function veil.bitmap_array_arange(text) is
'Return the array bounds for BMARRAY.';


create or replace
function veil.bitmap_array_brange(bmarray text) returns veil.veil_range_t
     as '@LIBPATH@', 
	'veil_bitmap_array_brange'
     language C stable strict;

comment on function veil.bitmap_array_brange(text) is
'Return the range of the bitmaps in BMARRAY.';



create or replace
function veil.init_bitmap_hash(bmhash text, range text) returns bool
     as '@LIBPATH@', 'veil_init_bitmap_hash'
     language C stable strict;

comment on function veil.init_bitmap_hash(text, text) is
'Initialise a bitmap hash variable called BMHASH to contain bitmaps of
size RANGE.

Return TRUE.';


create or replace
function veil.clear_bitmap_hash(bmhash text) returns bool
     as '@LIBPATH@', 'veil_clear_bitmap_hash'
     language C stable strict;

comment on function veil.clear_bitmap_hash(text) is
'Clear all bits in an existing bitmap hash named BMHASH.

Return TRUE.';


create or replace
function veil.bitmap_hash_key_exists(bmhash text, key text) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_hash_key_exists'
     language C stable strict;

comment on function veil.bitmap_hash_key_exists(text, text) is
'Determine whether in BMHASH the given KEY already exists.

Return TRUE if the key exists, else FALSE.';


create or replace
function veil.bitmap_from_hash(bmref text, bmhash text, key text) returns text
     as '@LIBPATH@', 
	'veil_bitmap_from_hash'
     language C stable strict;

comment on function veil.bitmap_from_hash(text, text, text) is
'Set BitmapRef BMREF to the bitmap from BMHASH identfied by KEY.

Return the name of BMREF.';


create or replace
function veil.bitmap_hash_testbit(bmhash text, key text, bitno int) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_hash_testbit'
     language C stable strict;

comment on function veil.bitmap_hash_testbit(text, text, int) is
'Test the bit, in the bitmap from BMHASH identified by KEY, given by
BITNO.

Return TRUE if the bit is set, else FALSE.';


create or replace
function veil.bitmap_hash_setbit(bmhash text, key text, bitno int) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_hash_setbit'
     language C stable strict;

comment on function veil.bitmap_hash_setbit(text, text, int) is
'Set the bit, in the bitmap from BMHASH identified by KEY, given by
BITNO to TRUE.

Return TRUE.';


create or replace
function veil.bitmap_hash_clearbit(bmhash text, key text, bitno int) returns bool
     as '@LIBPATH@', 
	'veil_bitmap_hash_clearbit'
     language C stable strict;

comment on function veil.bitmap_hash_clearbit(text, text, int) is
'Set the bit, in the bitmap from BMHASH identified by KEY, given by
BITNO to FALSE.

Return TRUE.';


create or replace
function veil.union_into_bitmap_hash(bmhash text, key text, bitmap text) returns bool
     as '@LIBPATH@', 
	'veil_union_into_bitmap_hash'
     language C stable strict;

comment on function veil.union_into_bitmap_hash(text, text, text) is
'Into the bitmap from BMHASH, identified by KEY, and union the bits from
BITMAP (which may be a bitmap or bitmap_ref).

Return TRUE.';


create or replace
function veil.union_from_bitmap_hash(bmhash text, key text, bitmap text) returns bool
     as '@LIBPATH@', 
	'veil_union_from_bitmap_hash'
     language C stable strict;
comment on function veil.union_from_bitmap_hash(text, text, text) is
'Retrieve the bitmap from BMHASH, identified by KEY, and union it into
BITMAP (which may be a bitmap or bitmap_ref).

Return TRUE.';


create or replace
function veil.intersect_from_bitmap_hash(bitmap text, bmhash text, key text) returns bool
     as '@LIBPATH@', 
	'veil_intersect_from_bitmap_hash'
     language C stable strict;
comment on function veil.intersect_from_bitmap_hash(text, text, text) is
'Into BITMAP, intersect the bits from the bitmap in BMHASH identified by
KEY.

Return TRUE.';


create or replace
function veil.bitmap_hash_bits(bmhash text, key text) returns setof int
     as '@LIBPATH@', 
	'veil_bitmap_hash_bits'
     language C stable strict;

comment on function veil.bitmap_hash_bits(text, text) is
'Return the set of bits in the bitset from BMHASH identfied by KEY.';


create or replace
function veil.bitmap_hash_range(bmhash text) returns veil.veil_range_t
     as '@LIBPATH@', 
	'veil_bitmap_hash_range'
     language C stable strict;

comment on function veil.bitmap_hash_range(text) is
'Return the range of all bitmaps in BMHASH.';


create or replace
function veil.bitmap_hash_entries(bmhash text) returns setof text
     as '@LIBPATH@', 
	'veil_bitmap_hash_entries'
     language C stable strict;

comment on function veil.bitmap_hash_entries(text) is
'Return the keys of all bitmaps in BMHASH.';


create or replace
function veil.int4_set(name text, value int) returns int
     as '@LIBPATH@', 
	'veil_int4_set'
     language C stable;

comment on function veil.int4_set(text, int) is
'Set the int variable NAME to VALUE.

Return the new value';


create or replace
function veil.int4_get(name text) returns int
     as '@LIBPATH@', 
	'veil_int4_get'
     language C stable strict;

comment on function veil.int4_get(text) is
'Return the value of int variable NAME.';


create or replace
function veil.init_int4array(arrayname text, range text) returns bool
     as '@LIBPATH@', 'veil_init_int4array'
     language C stable strict;

comment on function veil.init_int4array(text, text) is
'Initialise the int array ARRAYNAME, with an index range of RANGE.

Each entry in the array is set to zero.

Return TRUE.';


create or replace
function veil.clear_int4array(arrayname text) returns bool
     as '@LIBPATH@', 
	'veil_clear_int4array'
     language C stable strict;
comment on function veil.clear_int4array(text) is
'Reset each entry in the int4 array ARRAYNAME to zero.

Return TRUE.';



create or replace
function veil.int4array_set(arrayname text, idx int, value int) returns int
     as '@LIBPATH@', 
	'veil_int4array_set'
     language C stable;

comment on function veil.int4array_set(text, int, int) is
'Set the ARRAYNAME element IDX to VALUE.

Return the new value.';


create or replace
function veil.int4array_get(arrayname text, idx int) returns int
     as '@LIBPATH@', 
	'veil_int4array_get'
     language C stable strict;

comment on function veil.int4array_get(text, int) is
'Return the value of ARRAYNAME element IDX.';


create or replace
function veil.veil_init(doing_reset bool) returns bool 
     as '@LIBPATH@', 
	'veil_init'
     language C stable strict;

comment on function veil.veil_init(bool) is
'This calls all registered init functions, passing the DOING_RESET
parameter to them, in priority order.  If there are no registered
functions, an exception is raised.';


create or replace
function veil.veil_perform_reset() returns bool
     as '@LIBPATH@', 'veil_perform_reset'
     language C stable;

comment on function veil.veil_perform_reset() is
'Allow userspace to force call of veil_init.

This function may fail due to outstanding transactions possibly holding
shared memory that we wish to re-use.  In this case a warning will be
issued.  Once any long running transactions have completed, a retry
should succeed.

Return TRUE if successful, FALSE otherwise.';


create or replace
function veil.veil_force_reset() returns bool
     as '@LIBPATH@', 'veil_force_reset'
     language C stable;

comment on function veil.veil_force_reset() is
'Allow userspace to force an unconditional reset of veil shared memory.

This always causes a PANIC, causing the database to fully reset.';



create or replace
function veil.version() returns text
     as '@LIBPATH@', 'veil_version'
     language C stable;

comment on function veil.version() is
'Return a text string identifying the current veil version.';



create or replace
function veil.serialise(varname text) returns text
     as '@LIBPATH@', 
	'veil_serialise'
     language C stable strict;

comment on function veil.serialise(varname text) is
'Return a serialised copy of a variable VARNAME in text form.

This is intended to be used with pgmemcache so that session variables
can be efficiently cached.  Serialised values can be concatenated
together as a single string and then deserialised in a single operation.

The value can be restored by de-serialising it.';



create or replace
function veil.serialize(varname text) returns text
     as '@LIBPATH@', 
	'veil_serialise'
     language C stable strict;

comment on function veil.serialize(varname text) is
'Return a serialised copy of a variable VARNAME in text form.

This is intended to be used with pgmemcache so that session variables
can be efficiently cached.  Serialized values can be concatenated
together as a single string and then deserialized in a single operation.

The value can be restored by de-serializing it.';



create or replace
function veil.deserialise(stream text) returns int
     as '@LIBPATH@', 
	'veil_deserialise'
     language C stable strict;

comment on function veil.deserialise(text) is
'Reset the contents of a set of serialised variable from STREAM.

Return the number of items de-serialised.';


-- Ditto for victims of webster.
create or replace
function veil.deserialize(stream text) returns int
     as '@LIBPATH@', 
	'veil_deserialise'
     language C stable strict;

comment on function veil.deserialize(text) is
'Reset the contents of a set of serialized variable from STREAM.

Return the number of items de-serialized.';


revoke execute on function veil.share(text) from public;
revoke execute on function veil.veil_variables() from public;
revoke execute on function veil.init_range(text, int, int) from public;
revoke execute on function veil.range(text) from public;

revoke execute on function veil.init_bitmap(text, text) from public;
revoke execute on function veil.clear_bitmap(text) from public;
revoke execute on function veil.bitmap_setbit(text, int) from public;
revoke execute on function veil.bitmap_testbit(text, int) from public;
revoke execute on function veil.bitmap_bits(text) from public;
revoke execute on function veil.bitmap_range(text) from public;

revoke execute on function veil.init_bitmap_array(text, text, text)
  from public;
revoke execute on function veil.clear_bitmap_array(text) from public;
revoke execute on function veil.bitmap_from_array(text, text, int)
  from public;
revoke execute on function veil.bitmap_array_setbit(text, int, int)
  from public;
revoke execute on function veil.bitmap_array_testbit(text, int, int)
  from public;
revoke execute on function veil.union_from_bitmap_array(text, text, int)
  from public;
revoke execute on function veil.intersect_from_bitmap_array(text, text, int)
  from public;
revoke execute on function veil.bitmap_array_bits(text, int) from public;
revoke execute on function veil.bitmap_array_arange(text) from public;
revoke execute on function veil.bitmap_array_brange(text) from public;


revoke execute on function veil.init_bitmap_hash(text, text) from public;
revoke execute on function veil.clear_bitmap_hash(text) from public;
revoke execute on function veil.bitmap_hash_key_exists(text, text)
  from public;
revoke execute on function veil.bitmap_from_hash(text, text, text)
  from public;
revoke execute on function veil.bitmap_hash_setbit(text, text, int)
  from public;
revoke execute on function veil.bitmap_hash_testbit(text, text, int)
  from public;
revoke execute on function veil.union_into_bitmap_hash(text, text, text)
  from public;
revoke execute on function veil.union_from_bitmap_hash(text, text, text)
  from public;
revoke execute on function veil.intersect_from_bitmap_hash(text, text, text)
  from public;
revoke execute on function veil.bitmap_hash_bits(text, text) from public;
revoke execute on function veil.bitmap_hash_range(text) from public;
revoke execute on function veil.bitmap_hash_entries(text) from public;

revoke execute on function veil.init_int4array(text, text) from public;
revoke execute on function veil.clear_int4array(text) from public;
revoke execute on function veil.int4array_set(text, int, int) from public;
revoke execute on function veil.int4array_get(text, int) from public;

revoke execute on function veil.veil_init(bool) from public;
revoke execute on function veil.veil_perform_reset() from public;
revoke execute on function veil.veil_force_reset() from public;

revoke execute on function veil.serialise(text) from public;
revoke execute on function veil.serialize(text) from public;
revoke execute on function veil.deserialise(text) from public;
revoke execute on function veil.deserialize(text) from public;