-
Notifications
You must be signed in to change notification settings - Fork 22
/
vops--1.1.sql
3521 lines (3142 loc) · 196 KB
/
vops--1.1.sql
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
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* contrib/vops/vops--1.0.sql */
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "create extension vops" to load this file. \quit
create type vops_bool;
create type vops_char;
create type vops_int2;
create type vops_int4;
create type vops_int8;
create type vops_date;
create type vops_float4;
create type vops_float8;
create type vops_timestamp;
create type vops_interval;
create type vops_text;
create type deltatime;
create function vops_bool_input(cstring) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_bool_output(vops_bool) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_input(cstring) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_output(vops_char) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_input(cstring) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_output(vops_int2) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_input(cstring) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_output(vops_int4) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int8_input(cstring) returns vops_int8 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int8_output(vops_int8) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_float4_input(cstring) returns vops_float4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_float4_output(vops_float4) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_float8_input(cstring) returns vops_float8 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_float8_output(vops_float8) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_date_input(cstring) returns vops_date as 'MODULE_PATHNAME','vops_int4_input' language C parallel safe immutable strict;
create function vops_date_output(vops_date) returns cstring as 'MODULE_PATHNAME','vops_int4_output' language C parallel safe immutable strict;
create function vops_timestamp_input(cstring) returns vops_timestamp as 'MODULE_PATHNAME','vops_int8_input' language C parallel safe immutable strict;
create function vops_timestamp_output(vops_timestamp) returns cstring as 'MODULE_PATHNAME','vops_int8_output' language C parallel safe immutable strict;
create function vops_interval_input(cstring) returns vops_interval as 'MODULE_PATHNAME','vops_int8_input' language C parallel safe immutable strict;
create function vops_interval_output(vops_interval) returns cstring as 'MODULE_PATHNAME','vops_int8_output' language C parallel safe immutable strict;
create function vops_text_input(cstring, oid, integer) returns vops_text as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_output(vops_text) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_typmod_in(cstring[]) returns integer as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_deltatime_input(cstring) returns deltatime as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_deltatime_output(deltatime) returns cstring as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_time_interval(interval) returns deltatime as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create type vops_bool (
input = vops_bool_input,
output = vops_bool_output,
alignment = double,
internallength = 24
);
create type vops_char (
input = vops_char_input,
output = vops_char_output,
alignment = double,
internallength = 80 -- 16+64
);
create type vops_int2 (
input = vops_int2_input,
output = vops_int2_output,
alignment = double,
internallength = 144 -- 16+64*2
);
create type vops_int4 (
input = vops_int4_input,
output = vops_int4_output,
alignment = double,
internallength = 272 -- 16 + 64*4
);
create type vops_date (
input = vops_date_input,
output = vops_date_output,
alignment = double,
internallength = 272 -- 16 + 64*4
);
create type vops_int8 (
input = vops_int8_input,
output = vops_int8_output,
alignment = double,
internallength = 528 -- 16 + 64*8
);
create type vops_float4 (
input = vops_float4_input,
output = vops_float4_output,
alignment = double,
internallength = 272 -- 16 + 64*4
);
create type vops_float8 (
input = vops_float8_input,
output = vops_float8_output,
alignment = double,
internallength = 528 -- 16 + 64*8
);
create type vops_timestamp (
input = vops_timestamp_input,
output = vops_timestamp_output,
alignment = double,
internallength = 528 -- 16 + 64*8
);
create type vops_interval (
input = vops_interval_input,
output = vops_interval_output,
alignment = double,
internallength = 528 -- 16 + 64*8
);
create type vops_text (
input = vops_text_input,
output = vops_text_output,
typmod_in = vops_text_typmod_in,
alignment = double
);
create type deltatime (input=vops_deltatime_input, output=vops_deltatime_output, like=int8);
create cast (interval as deltatime) with function vops_time_interval(interval) as implicit;
-- text tile
create function vops_text_const(opd text, width integer) returns vops_text as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_concat(left vops_text, right vops_text) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator || (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_concat);
create function vops_text_eq(left vops_text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_eq_rconst(left vops_text, right text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_eq_lconst(left text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator = (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_eq, commutator= =);
create operator = (leftarg=vops_text, rightarg=text, procedure=vops_text_eq_rconst, commutator= =);
create operator = (leftarg=text, rightarg=vops_text, procedure=vops_text_eq_lconst, commutator= =);
create function vops_text_ne(left vops_text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_ne_rconst(left vops_text, right text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_ne_lconst(left text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <> (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_ne, commutator= <>);
create operator <> (leftarg=vops_text, rightarg=text, procedure=vops_text_ne_rconst, commutator= <>);
create operator <> (leftarg=text, rightarg=vops_text, procedure=vops_text_ne_lconst, commutator= <>);
create function vops_text_gt(left vops_text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_gt_rconst(left vops_text, right text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_gt_lconst(left text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator > (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_gt, commutator= <);
create operator > (leftarg=vops_text, rightarg=text, procedure=vops_text_gt_rconst, commutator= <);
create operator > (leftarg=text, rightarg=vops_text, procedure=vops_text_gt_lconst, commutator= <);
create function vops_text_lt(left vops_text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_lt_rconst(left vops_text, right text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_lt_lconst(left text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator < (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_lt, commutator= >);
create operator < (leftarg=vops_text, rightarg=text, procedure=vops_text_lt_rconst, commutator= >);
create operator < (leftarg=text, rightarg=vops_text, procedure=vops_text_lt_lconst, commutator= >);
create function vops_text_ge(left vops_text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_ge_rconst(left vops_text, right text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_ge_lconst(left text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator >= (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_ge, commutator= <=);
create operator >= (leftarg=vops_text, rightarg=text, procedure=vops_text_ge_rconst, commutator= <=);
create operator >= (leftarg=text, rightarg=vops_text, procedure=vops_text_ge_lconst, commutator= <=);
create function vops_text_le(left vops_text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_le_rconst(left vops_text, right text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_text_le_lconst(left text, right vops_text) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <= (leftarg=vops_text, rightarg=vops_text, procedure=vops_text_le, commutator= >=);
create operator <= (leftarg=vops_text, rightarg=text, procedure=vops_text_le_rconst, commutator= >=);
create operator <= (leftarg=text, rightarg=vops_text, procedure=vops_text_le_lconst, commutator= >=);
create function betwixt(opd vops_text, low text, high text) returns vops_bool as 'MODULE_PATHNAME','vops_betwixt_text' language C parallel safe immutable strict;
create function ifnull(opd vops_text, subst text) returns vops_text as 'MODULE_PATHNAME','vops_ifnull_text' language C parallel safe immutable strict;
create function ifnull(opd vops_text, subst vops_text) returns vops_text as 'MODULE_PATHNAME','vops_coalesce_text' language C parallel safe immutable strict;
create function vops_text_first_accumulate(state internal, val vops_text, ts vops_timestamp) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_text_first_final(state internal) returns text as 'MODULE_PATHNAME','vops_first_final' language C parallel safe strict;
create function vops_first_combine(internal, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate first(vops_text, vops_timestamp) (
sfunc = vops_text_first_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_text_first_final,
combinefunc = vops_first_combine,
parallel = safe
);
create function vops_text_last_accumulate(state internal, val vops_text, ts vops_timestamp) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_last_combine(internal, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate last(vops_text, vops_timestamp) (
sfunc = vops_text_last_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_text_first_final,
combinefunc = vops_last_combine,
parallel = safe
);
create function vops_approxdc_final(state internal) returns int8 as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_approxdc_combine(internal, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_approxdc_serial(internal) returns bytea as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_approxdc_deserial(bytea, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_text_approxdc_accumulate(state internal, val vops_text) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate approxdc(vops_text) (
sfunc = vops_text_approxdc_accumulate,
stype = internal,
sspace = 128,
finalfunc = vops_approxdc_final,
combinefunc = vops_approxdc_combine,
serialfunc = vops_approxdc_serial,
deserialfunc = vops_approxdc_deserial,
parallel = safe
);
create function first(tile vops_text) returns text as 'MODULE_PATHNAME','vops_text_first' language C parallel safe immutable strict;
create function last(tile vops_text) returns text as 'MODULE_PATHNAME','vops_text_last' language C parallel safe immutable strict;
create function low(tile vops_text) returns text as 'MODULE_PATHNAME','vops_text_low' language C parallel safe immutable strict;
create function high(tile vops_text) returns text as 'MODULE_PATHNAME','vops_text_high' language C parallel safe immutable strict;
-- char tile
create function vops_char_const(opd "char") returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create cast ("char" as vops_char) with function vops_char_const("char");
create function vops_char_concat(left vops_char, right vops_char) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator || (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_concat);
create function vops_char_group_by(state internal, group_by vops_char, aggregates cstring, variadic anyarray) returns internal as 'MODULE_PATHNAME' language C parallel safe immutable;
create function vops_agg_combine(state1 internal, state2 internal) returns internal as 'MODULE_PATHNAME' language C parallel safe immutable;
create function vops_agg_serial(internal) returns bytea as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_agg_deserial(bytea, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_agg_final(internal) returns bigint as 'MODULE_PATHNAME' language C parallel safe strict;
create aggregate map(group_by vops_char, aggregates cstring, variadic anyarray) (
sfunc = vops_char_group_by,
stype = internal,
finalfunc=vops_agg_final,
combinefunc = vops_agg_combine,
serialfunc = vops_agg_serial,
deserialfunc = vops_agg_deserial,
parallel = safe);
create function vops_char_sub(left vops_char, right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_sub_rconst(left vops_char, right "char") returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_sub_lconst(left "char", right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator - (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_sub);
create operator - (leftarg=vops_char, rightarg="char", procedure=vops_char_sub_rconst);
create operator - (leftarg="char", rightarg=vops_char, procedure=vops_char_sub_lconst);
create function vops_char_add(left vops_char, right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_add_rconst(left vops_char, right "char") returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_add_lconst(left "char", right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator + (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_add, commutator= +);
create operator + (leftarg=vops_char, rightarg="char", procedure=vops_char_add_rconst, commutator= +);
create operator + (leftarg="char", rightarg=vops_char, procedure=vops_char_add_lconst, commutator= +);
create function vops_char_mul(left vops_char, right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_mul_rconst(left vops_char, right "char") returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_mul_lconst(left "char", right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator * (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_mul, commutator= *);
create operator * (leftarg=vops_char, rightarg="char", procedure=vops_char_mul_rconst, commutator= *);
create operator * (leftarg="char", rightarg=vops_char, procedure=vops_char_mul_lconst, commutator= *);
create function vops_char_div(left vops_char, right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_div_rconst(left vops_char, right "char") returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_div_lconst(left "char", right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator / (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_div);
create operator / (leftarg=vops_char, rightarg="char", procedure=vops_char_div_rconst);
create operator / (leftarg="char", rightarg=vops_char, procedure=vops_char_div_lconst);
create function vops_char_rem(left vops_char, right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_rem_rconst(left vops_char, right "char") returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_rem_lconst(left "char", right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator % (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_rem);
create operator % (leftarg=vops_char, rightarg="char", procedure=vops_char_rem_rconst);
create operator % (leftarg="char", rightarg=vops_char, procedure=vops_char_rem_lconst);
create function vops_char_eq(left vops_char, right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_eq_rconst(left vops_char, right "char") returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_eq_lconst(left "char", right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator = (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_eq, commutator= =);
create operator = (leftarg=vops_char, rightarg="char", procedure=vops_char_eq_rconst, commutator= =);
create operator = (leftarg="char", rightarg=vops_char, procedure=vops_char_eq_lconst, commutator= =);
create function vops_char_ne(left vops_char, right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_ne_rconst(left vops_char, right "char") returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_ne_lconst(left "char", right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <> (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_ne, commutator= <>);
create operator <> (leftarg=vops_char, rightarg="char", procedure=vops_char_ne_rconst, commutator= <>);
create operator <> (leftarg="char", rightarg=vops_char, procedure=vops_char_ne_lconst, commutator= <>);
create function vops_char_gt(left vops_char, right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_gt_rconst(left vops_char, right "char") returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_gt_lconst(left "char", right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator > (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_gt, commutator= <);
create operator > (leftarg=vops_char, rightarg="char", procedure=vops_char_gt_rconst, commutator= <);
create operator > (leftarg="char", rightarg=vops_char, procedure=vops_char_gt_lconst, commutator= <);
create function vops_char_lt(left vops_char, right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_lt_rconst(left vops_char, right "char") returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_lt_lconst(left "char", right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator < (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_lt, commutator= >);
create operator < (leftarg=vops_char, rightarg="char", procedure=vops_char_lt_rconst, commutator= >);
create operator < (leftarg="char", rightarg=vops_char, procedure=vops_char_lt_lconst, commutator= >);
create function vops_char_ge(left vops_char, right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_ge_rconst(left vops_char, right "char") returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_ge_lconst(left "char", right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator >= (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_ge, commutator= <=);
create operator >= (leftarg=vops_char, rightarg="char", procedure=vops_char_ge_rconst, commutator= <=);
create operator >= (leftarg="char", rightarg=vops_char, procedure=vops_char_ge_lconst, commutator= <=);
create function vops_char_le(left vops_char, right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_le_rconst(left vops_char, right "char") returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_char_le_lconst(left "char", right vops_char) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <= (leftarg=vops_char, rightarg=vops_char, procedure=vops_char_le, commutator= >=);
create operator <= (leftarg=vops_char, rightarg="char", procedure=vops_char_le_rconst, commutator= >=);
create operator <= (leftarg="char", rightarg=vops_char, procedure=vops_char_le_lconst, commutator= >=);
create function betwixt(opd vops_char, low "char", high "char") returns vops_bool as 'MODULE_PATHNAME','vops_betwixt_char' language C parallel safe immutable strict;
create function ifnull(opd vops_char, subst "char") returns vops_char as 'MODULE_PATHNAME','vops_ifnull_char' language C parallel safe immutable strict;
create function ifnull(opd vops_char, subst vops_char) returns vops_char as 'MODULE_PATHNAME','vops_coalesce_char' language C parallel safe immutable strict;
create function vops_char_neg(right vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator - (rightarg=vops_char, procedure=vops_char_neg);
create function vops_char_sum_accumulate(state int8, val vops_char) returns int8 as 'MODULE_PATHNAME' language C parallel safe;
create aggregate sum(vops_char) (
sfunc = vops_char_sum_accumulate,
stype = int8,
combinefunc = int8pl,
parallel = safe
);
create function vops_char_sum_extend(state vops_int8, val vops_char) returns vops_int8 as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_sum_reduce(state vops_int8, val vops_char) returns vops_int8 as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate msum(vops_char) (
sfunc = vops_char_sum_extend,
stype = vops_int8,
mstype = vops_int8,
msfunc = vops_char_sum_extend,
minvfunc = vops_char_sum_reduce,
parallel = safe
);
create function vops_char_msum_extend(state internal, val vops_char, winsize integer) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_msum_reduce(state internal, val vops_char, winsize integer) returns internal as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create function vops_char_msum_final(state internal) returns vops_int8 as 'MODULE_PATHNAME','vops_win_final' language C parallel safe strict;
create aggregate msum(vops_char, winsize integer) (
sfunc = vops_char_msum_extend,
stype = internal,
finalfunc = vops_char_msum_final,
mstype = internal,
msfunc = vops_char_msum_extend,
minvfunc = vops_char_msum_reduce,
mfinalfunc = vops_char_msum_final,
parallel = safe
);
create function vops_avg_final(state internal) returns float8 as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_avg_combine(internal, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_avg_serial(internal) returns bytea as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_avg_deserial(bytea, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_char_avg_accumulate(state internal, val vops_char) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate avg(vops_char) (
sfunc = vops_char_avg_accumulate,
stype = internal,
sspace = 16,
finalfunc = vops_avg_final,
combinefunc = vops_avg_combine,
serialfunc = vops_avg_serial,
deserialfunc = vops_avg_deserial,
parallel = safe
);
create function vops_char_avg_extend(state internal, val vops_char) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_avg_reduce(state internal, val vops_char) returns internal as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create function vops_mavg_final(state internal) returns vops_float8 as 'MODULE_PATHNAME','vops_win_final' language C parallel safe strict;
create aggregate mavg(vops_char) (
sfunc = vops_char_avg_extend,
stype = internal,
finalfunc = vops_mavg_final,
mstype = internal,
msfunc = vops_char_avg_extend,
minvfunc = vops_char_avg_reduce,
mfinalfunc = vops_mavg_final,
parallel = safe
);
create function vops_var_combine(internal, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_var_serial(internal) returns bytea as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_var_deserial(bytea, internal) returns internal as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_var_pop_final(state internal) returns float8 as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_var_samp_final(state internal) returns float8 as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_stddev_pop_final(state internal) returns float8 as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_stddev_samp_final(state internal) returns float8 as 'MODULE_PATHNAME' language C parallel safe strict;
create function vops_wavg_final(state internal) returns float8 as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_var_accumulate(state internal, val vops_char) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate var_pop(vops_char) (
sfunc = vops_char_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_var_pop_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate var_samp(vops_char) (
sfunc = vops_char_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_var_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate variance(vops_char) (
sfunc = vops_char_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_var_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate stddev_pop(vops_char) (
sfunc = vops_char_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_stddev_pop_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate stddev_samp(vops_char) (
sfunc = vops_char_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_stddev_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate stddev(vops_char) (
sfunc = vops_char_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_stddev_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create function vops_char_wavg_accumulate(state internal, x vops_char, y vops_char) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate wavg(vops_char, vops_char) (
sfunc = vops_char_wavg_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_wavg_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create function vops_char_max_accumulate(state char, val vops_char) returns char as 'MODULE_PATHNAME' language C parallel safe;
create aggregate max(vops_char) (
sfunc = vops_char_max_accumulate,
stype = char,
parallel = safe
);
create function vops_char_max_extend(state vops_char, val vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_max_reduce(state vops_char, val vops_char) returns vops_char as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate mmax(vops_char) (
sfunc = vops_char_max_extend,
stype = vops_char,
mstype = vops_char,
msfunc = vops_char_max_extend,
minvfunc = vops_char_max_reduce,
parallel = safe
);
create function vops_char_min_accumulate(state char, val vops_char) returns char as 'MODULE_PATHNAME' language C parallel safe;
create aggregate min(vops_char) (
sfunc = vops_char_min_accumulate,
stype = char,
parallel = safe
);
create function vops_char_min_extend(state vops_char, val vops_char) returns vops_char as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_min_reduce(state vops_char, val vops_char) returns vops_char as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate mmin(vops_char) (
sfunc = vops_char_min_extend,
stype = vops_char,
mstype = vops_char,
msfunc = vops_char_min_extend,
minvfunc = vops_char_min_reduce,
parallel = safe
);
create function vops_char_lag_extend(state internal, val vops_char) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_lag_reduce(state internal, val vops_char) returns internal as 'MODULE_PATHNAME','vops_lag_reduce' language C parallel safe;
create function vops_win_char_final(state internal) returns vops_char as 'MODULE_PATHNAME','vops_win_final' language C parallel safe strict;
create aggregate lag(vops_char) (
sfunc = vops_char_lag_extend,
stype = internal,
finalfunc = vops_win_char_final,
mstype = internal,
msfunc = vops_char_lag_extend,
minvfunc = vops_char_lag_reduce,
mfinalfunc = vops_win_char_final,
parallel = safe
);
create function vops_char_count_accumulate(state int8, val vops_char) returns int8 as 'MODULE_PATHNAME','vops_count_any_accumulate' language C parallel safe strict;
create aggregate count(vops_char) (
sfunc = vops_char_count_accumulate,
stype = int8,
combinefunc = int8pl,
INITCOND = '0',
parallel = safe
);
create function vops_char_count_extend(state vops_int8, val vops_char) returns vops_int8 as 'MODULE_PATHNAME','vops_count_any_extend' language C parallel safe strict;
create function vops_char_count_reduce(state vops_int8, val vops_char) returns vops_int8 as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe strict;
create aggregate mcount(vops_char) (
sfunc = vops_char_count_extend,
stype = vops_int8,
initcond = '0',
mstype = vops_int8,
msfunc = vops_char_count_extend,
minvfunc = vops_char_count_reduce,
minitcond = '0',
parallel = safe
);
create function vops_char_first_accumulate(state internal, val vops_char, ts vops_timestamp) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_char_first_final(state internal) returns "char" as 'MODULE_PATHNAME','vops_first_final' language C parallel safe;
create aggregate first(vops_char, vops_timestamp) (
sfunc = vops_char_first_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_char_first_final,
combinefunc = vops_first_combine,
parallel = safe
);
create function vops_char_last_accumulate(state internal, val vops_char, ts vops_timestamp) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate last(vops_char, vops_timestamp) (
sfunc = vops_char_last_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_char_first_final,
combinefunc = vops_last_combine,
parallel = safe
);
create function vops_char_approxdc_accumulate(state internal, val vops_char) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate approxdc(vops_char) (
sfunc = vops_char_approxdc_accumulate,
stype = internal,
sspace = 128,
finalfunc = vops_approxdc_final,
combinefunc = vops_approxdc_combine,
serialfunc = vops_approxdc_serial,
deserialfunc = vops_approxdc_deserial,
parallel = safe
);
create function first(tile vops_char) returns "char" as 'MODULE_PATHNAME','vops_char_first' language C parallel safe immutable strict;
create function last(tile vops_char) returns "char" as 'MODULE_PATHNAME','vops_char_last' language C parallel safe immutable strict;
create function low(tile vops_char) returns "char" as 'MODULE_PATHNAME','vops_char_low' language C parallel safe immutable strict;
create function high(tile vops_char) returns "char" as 'MODULE_PATHNAME','vops_char_high' language C parallel safe immutable strict;
-- int2 tile
create function vops_int2_const(opd int4) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create cast (int4 as vops_int2) with function vops_int2_const(int4);
create function vops_int2_concat(left vops_int2, right vops_int2) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator || (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_concat);
create function vops_int2_group_by(state internal, group_by vops_int2, aggregates cstring, variadic anyarray) returns internal as 'MODULE_PATHNAME' language C parallel safe immutable;
create aggregate map(group_by vops_int2, aggregates cstring, variadic anyarray) (
sfunc = vops_int2_group_by,
stype = internal,
finalfunc=vops_agg_final,
combinefunc = vops_agg_combine,
serialfunc = vops_agg_serial,
deserialfunc = vops_agg_deserial,
parallel = safe);
create function vops_int2_sub(left vops_int2, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_sub_rconst(left vops_int2, right int4) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_sub_lconst(left int4, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator - (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_sub);
create operator - (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_sub_rconst);
create operator - (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_sub_lconst);
create function vops_int2_add(left vops_int2, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_add_rconst(left vops_int2, right int4) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_add_lconst(left int4, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator + (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_add, commutator= +);
create operator + (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_add_rconst, commutator= +);
create operator + (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_add_lconst, commutator= +);
create function vops_int2_mul(left vops_int2, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_mul_rconst(left vops_int2, right int4) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_mul_lconst(left int4, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator * (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_mul, commutator= *);
create operator * (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_mul_rconst, commutator= *);
create operator * (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_mul_lconst, commutator= *);
create function vops_int2_div(left vops_int2, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_div_rconst(left vops_int2, right int4) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_div_lconst(left int4, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator / (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_div);
create operator / (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_div_rconst);
create operator / (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_div_lconst);
create function vops_int2_rem(left vops_int2, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_rem_rconst(left vops_int2, right int4) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_rem_lconst(left int4, right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator % (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_rem);
create operator % (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_rem_rconst);
create operator % (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_rem_lconst);
create function vops_int2_eq(left vops_int2, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_eq_rconst(left vops_int2, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_eq_lconst(left int4, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator = (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_eq, commutator= =);
create operator = (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_eq_rconst, commutator= =);
create operator = (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_eq_lconst, commutator= =);
create function vops_int2_ne(left vops_int2, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_ne_rconst(left vops_int2, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_ne_lconst(left int4, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <> (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_ne, commutator= <>);
create operator <> (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_ne_rconst, commutator= <>);
create operator <> (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_ne_lconst, commutator= <>);
create function vops_int2_gt(left vops_int2, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_gt_rconst(left vops_int2, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_gt_lconst(left int4, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator > (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_gt, commutator= <);
create operator > (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_gt_rconst, commutator= <);
create operator > (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_gt_lconst, commutator= <);
create function vops_int2_lt(left vops_int2, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_lt_rconst(left vops_int2, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_lt_lconst(left int4, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator < (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_lt, commutator= >);
create operator < (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_lt_rconst, commutator= >);
create operator < (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_lt_lconst, commutator= >);
create function vops_int2_ge(left vops_int2, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_ge_rconst(left vops_int2, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_ge_lconst(left int4, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator >= (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_ge, commutator= <=);
create operator >= (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_ge_rconst, commutator= <=);
create operator >= (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_ge_lconst, commutator= <=);
create function vops_int2_le(left vops_int2, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_le_rconst(left vops_int2, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int2_le_lconst(left int4, right vops_int2) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <= (leftarg=vops_int2, rightarg=vops_int2, procedure=vops_int2_le, commutator= >=);
create operator <= (leftarg=vops_int2, rightarg=int4, procedure=vops_int2_le_rconst, commutator= >=);
create operator <= (leftarg=int4, rightarg=vops_int2, procedure=vops_int2_le_lconst, commutator= >=);
create function betwixt(opd vops_int2, low int4, high int4) returns vops_bool as 'MODULE_PATHNAME','vops_betwixt_int2' language C parallel safe immutable strict;
create function ifnull(opd vops_int2, subst int4) returns vops_int2 as 'MODULE_PATHNAME','vops_ifnull_int2' language C parallel safe immutable strict;
create function ifnull(opd vops_int2, subst vops_int2) returns vops_int2 as 'MODULE_PATHNAME','vops_coalesce_int2' language C parallel safe immutable strict;
create function vops_int2_neg(right vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator - (rightarg=vops_int2, procedure=vops_int2_neg);
create function vops_int2_sum_accumulate(state int8, val vops_int2) returns int8 as 'MODULE_PATHNAME' language C parallel safe;
create aggregate sum(vops_int2) (
sfunc = vops_int2_sum_accumulate,
stype = int8,
combinefunc = int8pl,
parallel = safe
);
create function vops_int2_sum_extend(state vops_int8, val vops_int2) returns vops_int8 as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_sum_reduce(state vops_int8, val vops_int2) returns vops_int8 as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate msum(vops_int2) (
sfunc = vops_int2_sum_extend,
stype = vops_int8,
mstype = vops_int8,
msfunc = vops_int2_sum_extend,
minvfunc = vops_int2_sum_reduce,
parallel = safe
);
create function vops_int2_msum_extend(state internal, val vops_int2, winsize integer) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_msum_reduce(state internal, val vops_int2, winsize integer) returns internal as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create function vops_int2_msum_final(state internal) returns vops_int8 as 'MODULE_PATHNAME','vops_win_final' language C parallel safe strict;
create aggregate msum(vops_int2, winsize integer) (
sfunc = vops_int2_msum_extend,
stype = internal,
finalfunc = vops_int2_msum_final,
mstype = internal,
msfunc = vops_int2_msum_extend,
minvfunc = vops_int2_msum_reduce,
mfinalfunc = vops_int2_msum_final,
parallel = safe
);
create function vops_int2_var_accumulate(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate var_pop(vops_int2) (
sfunc = vops_int2_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_var_pop_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate var_samp(vops_int2) (
sfunc = vops_int2_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_var_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate variance(vops_int2) (
sfunc = vops_int2_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_var_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate stddev_pop(vops_int2) (
sfunc = vops_int2_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_stddev_pop_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate stddev_samp(vops_int2) (
sfunc = vops_int2_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_stddev_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create aggregate stddev(vops_int2) (
sfunc = vops_int2_var_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_stddev_samp_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create function vops_int2_wavg_accumulate(state internal, x vops_int2, y vops_int2) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate wavg(vops_int2, vops_int2) (
sfunc = vops_int2_wavg_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_wavg_final,
combinefunc = vops_var_combine,
serialfunc = vops_var_serial,
deserialfunc = vops_var_deserial,
parallel = safe
);
create function vops_int2_avg_accumulate(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate avg(vops_int2) (
sfunc = vops_int2_avg_accumulate,
stype = internal,
sspace = 16,
finalfunc = vops_avg_final,
combinefunc = vops_avg_combine,
serialfunc = vops_avg_serial,
deserialfunc = vops_avg_deserial,
parallel = safe
);
create function vops_int2_avg_extend(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_avg_reduce(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate mavg(vops_int2) (
sfunc = vops_int2_avg_extend,
finalfunc = vops_mavg_final,
stype = internal,
mstype = internal,
msfunc = vops_int2_avg_extend,
minvfunc = vops_int2_avg_reduce,
mfinalfunc = vops_mavg_final,
parallel = safe
);
create function vops_int2_max_accumulate(state int2, val vops_int2) returns int2 as 'MODULE_PATHNAME' language C parallel safe;
create aggregate max(vops_int2) (
sfunc = vops_int2_max_accumulate,
stype = int2,
combinefunc = int2larger,
parallel = safe
);
create function vops_int2_max_extend(state vops_int2, val vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_max_reduce(state vops_int2, val vops_int2) returns vops_int2 as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate mmax(vops_int2) (
sfunc = vops_int2_max_extend,
stype = vops_int2,
mstype = vops_int2,
msfunc = vops_int2_max_extend,
minvfunc = vops_int2_max_reduce,
parallel = safe
);
create function vops_int2_min_accumulate(state int2, val vops_int2) returns int2 as 'MODULE_PATHNAME' language C parallel safe;
create aggregate min(vops_int2) (
sfunc = vops_int2_min_accumulate,
stype = int2,
combinefunc = int2smaller,
parallel = safe
);
create function vops_int2_min_extend(state vops_int2, val vops_int2) returns vops_int2 as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_min_reduce(state vops_int2, val vops_int2) returns vops_int2 as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe;
create aggregate mmin(vops_int2) (
sfunc = vops_int2_min_extend,
stype = vops_int2,
mstype = vops_int2,
msfunc = vops_int2_min_extend,
minvfunc = vops_int2_min_reduce,
parallel = safe
);
create function vops_int2_lag_extend(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_lag_reduce(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME','vops_lag_reduce' language C parallel safe;
create function vops_int2_lag_final(state internal) returns vops_int2 as 'MODULE_PATHNAME','vops_win_final' language C parallel safe strict;
create aggregate lag(vops_int2) (
sfunc = vops_int2_lag_extend,
stype = internal,
finalfunc = vops_int2_lag_final,
mstype = internal,
msfunc = vops_int2_lag_extend,
minvfunc = vops_int2_lag_reduce,
mfinalfunc = vops_int2_lag_final,
parallel = safe
);
create function vops_int2_count_accumulate(state int8, val vops_int2) returns int8 as 'MODULE_PATHNAME','vops_count_any_accumulate' language C parallel safe strict;
create aggregate count(vops_int2) (
sfunc = vops_int2_count_accumulate,
stype = int8,
combinefunc = int8pl,
INITCOND = '0',
parallel = safe
);
create function vops_int2_count_extend(state vops_int8, val vops_int2) returns vops_int8 as 'MODULE_PATHNAME','vops_count_any_extend' language C parallel safe strict;
create function vops_int2_count_reduce(state vops_int8, val vops_int2) returns vops_int8 as 'MODULE_PATHNAME','vops_window_reduce' language C parallel safe strict;
create aggregate mcount(vops_int2) (
sfunc = vops_int2_count_extend,
stype = vops_int8,
initcond = '0',
mstype = vops_int8,
msfunc = vops_int2_count_extend,
minvfunc = vops_int2_count_reduce,
minitcond = '0',
parallel = safe
);
create function vops_int2_first_accumulate(state internal, val vops_int2, ts vops_timestamp) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create function vops_int2_first_final(state internal) returns int2 as 'MODULE_PATHNAME','vops_first_final' language C parallel safe;
create aggregate first(vops_int2, vops_timestamp) (
sfunc = vops_int2_first_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_int2_first_final,
combinefunc = vops_first_combine,
parallel = safe
);
create function vops_int2_last_accumulate(state internal, val vops_int2, ts vops_timestamp) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate last(vops_int2, vops_timestamp) (
sfunc = vops_int2_last_accumulate,
stype = internal,
sspace = 24,
finalfunc = vops_int2_first_final,
combinefunc = vops_last_combine,
parallel = safe
);
create function vops_int2_approxdc_accumulate(state internal, val vops_int2) returns internal as 'MODULE_PATHNAME' language C parallel safe;
create aggregate approxdc(vops_int2) (
sfunc = vops_int2_approxdc_accumulate,
stype = internal,
sspace = 128,
finalfunc = vops_approxdc_final,
combinefunc = vops_approxdc_combine,
serialfunc = vops_approxdc_serial,
deserialfunc = vops_approxdc_deserial,
parallel = safe
);
create function first(tile vops_int2) returns int2 as 'MODULE_PATHNAME','vops_int2_first' language C parallel safe immutable strict;
create function last(tile vops_int2) returns int2 as 'MODULE_PATHNAME','vops_int2_last' language C parallel safe immutable strict;
create function low(tile vops_int2) returns int2 as 'MODULE_PATHNAME','vops_int2_low' language C parallel safe immutable strict;
create function high(tile vops_int2) returns int2 as 'MODULE_PATHNAME','vops_int2_high' language C parallel safe immutable strict;
-- int4 tile
create function vops_int4_const(opd int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create cast (int4 as vops_int4) with function vops_int4_const(int4);
create function vops_int4_concat(left vops_int4, right vops_int4) returns vops_int8 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator || (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_concat);
create function vops_int4_group_by(state internal, group_by vops_int4, aggregates cstring, variadic anyarray) returns internal as 'MODULE_PATHNAME' language C parallel safe immutable;
create aggregate map(group_by vops_int4, aggregates cstring, variadic anyarray) (
sfunc = vops_int4_group_by,
stype = internal,
finalfunc=vops_agg_final,
combinefunc = vops_agg_combine,
serialfunc = vops_agg_serial,
deserialfunc = vops_agg_deserial,
parallel = safe);
create function vops_int4_sub(left vops_int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_sub_rconst(left vops_int4, right int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_sub_lconst(left int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator - (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_sub);
create operator - (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_sub_rconst);
create operator - (leftarg=int4, rightarg=vops_int4, procedure=vops_int4_sub_lconst);
create function vops_int4_add(left vops_int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_add_rconst(left vops_int4, right int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_add_lconst(left int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator + (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_add, commutator= +);
create operator + (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_add_rconst, commutator= +);
create operator + (leftarg=int4, rightarg=vops_int4, procedure=vops_int4_add_lconst, commutator= +);
create function vops_int4_mul(left vops_int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_mul_rconst(left vops_int4, right int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_mul_lconst(left int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator * (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_mul, commutator= *);
create operator * (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_mul_rconst, commutator= *);
create operator * (leftarg=int4, rightarg=vops_int4, procedure=vops_int4_mul_lconst, commutator= *);
create function vops_int4_div(left vops_int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_div_rconst(left vops_int4, right int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_div_lconst(left int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator / (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_div);
create operator / (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_div_rconst);
create operator / (leftarg=int4, rightarg=vops_int4, procedure=vops_int4_div_lconst);
create function vops_int4_rem(left vops_int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_rem_rconst(left vops_int4, right int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_rem_lconst(left int4, right vops_int4) returns vops_int4 as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator % (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_rem);
create operator % (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_rem_rconst);
create operator % (leftarg=int4, rightarg=vops_int4, procedure=vops_int4_rem_lconst);
create function vops_int4_eq(left vops_int4, right vops_int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_eq_rconst(left vops_int4, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_eq_lconst(left int4, right vops_int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator = (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_eq, commutator= =);
create operator = (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_eq_rconst, commutator= =);
create operator = (leftarg=int4, rightarg=vops_int4, procedure=vops_int4_eq_lconst, commutator= =);
create function vops_int4_ne(left vops_int4, right vops_int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_ne_rconst(left vops_int4, right int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create function vops_int4_ne_lconst(left int4, right vops_int4) returns vops_bool as 'MODULE_PATHNAME' language C parallel safe immutable strict;
create operator <> (leftarg=vops_int4, rightarg=vops_int4, procedure=vops_int4_ne, commutator= <>);
create operator <> (leftarg=vops_int4, rightarg=int4, procedure=vops_int4_ne_rconst, commutator= <>);