File tree 2 files changed +131
-0
lines changed 2 files changed +131
-0
lines changed Original file line number Diff line number Diff line change @@ -434,8 +434,69 @@ create function tcl_int4lt(int4,int4) returns bool as '
434
434
}
435
435
return f
436
436
' language pltcl;
437
+ create function tcl_int4le(int4,int4) returns bool as '
438
+ if {$1 <= $2} {
439
+ return t
440
+ }
441
+ return f
442
+ ' language pltcl;
443
+ create function tcl_int4eq(int4,int4) returns bool as '
444
+ if {$1 == $2} {
445
+ return t
446
+ }
447
+ return f
448
+ ' language pltcl;
449
+ create function tcl_int4ge(int4,int4) returns bool as '
450
+ if {$1 >= $2} {
451
+ return t
452
+ }
453
+ return f
454
+ ' language pltcl;
455
+ create function tcl_int4gt(int4,int4) returns bool as '
456
+ if {$1 > $2} {
457
+ return t
458
+ }
459
+ return f
460
+ ' language pltcl;
437
461
create operator @< (
438
462
leftarg = int4,
439
463
rightarg = int4,
440
464
procedure = tcl_int4lt
441
465
);
466
+ create operator @<= (
467
+ leftarg = int4,
468
+ rightarg = int4,
469
+ procedure = tcl_int4le
470
+ );
471
+ create operator @= (
472
+ leftarg = int4,
473
+ rightarg = int4,
474
+ procedure = tcl_int4eq
475
+ );
476
+ create operator @>= (
477
+ leftarg = int4,
478
+ rightarg = int4,
479
+ procedure = tcl_int4ge
480
+ );
481
+ create operator @> (
482
+ leftarg = int4,
483
+ rightarg = int4,
484
+ procedure = tcl_int4gt
485
+ );
486
+ create function tcl_int4cmp(int4,int4) returns int4 as '
487
+ if {$1 < $2} {
488
+ return -1
489
+ }
490
+ if {$1 > $2} {
491
+ return 1
492
+ }
493
+ return 0
494
+ ' language pltcl;
495
+ CREATE OPERATOR CLASS tcl_int4_ops
496
+ FOR TYPE int4 USING btree AS
497
+ OPERATOR 1 @<,
498
+ OPERATOR 2 @<=,
499
+ OPERATOR 3 @=,
500
+ OPERATOR 4 @>=,
501
+ OPERATOR 5 @>,
502
+ FUNCTION 1 tcl_int4cmp(int4,int4) ;
Original file line number Diff line number Diff line change @@ -472,9 +472,79 @@ create function tcl_int4lt(int4,int4) returns bool as '
472
472
return f
473
473
' language pltcl;
474
474
475
+ create function tcl_int4le (int4,int4) returns bool as '
476
+ if {$1 <= $2} {
477
+ return t
478
+ }
479
+ return f
480
+ ' language pltcl;
481
+
482
+ create function tcl_int4eq (int4,int4) returns bool as '
483
+ if {$1 == $2} {
484
+ return t
485
+ }
486
+ return f
487
+ ' language pltcl;
488
+
489
+ create function tcl_int4ge (int4,int4) returns bool as '
490
+ if {$1 >= $2} {
491
+ return t
492
+ }
493
+ return f
494
+ ' language pltcl;
495
+
496
+ create function tcl_int4gt (int4,int4) returns bool as '
497
+ if {$1 > $2} {
498
+ return t
499
+ }
500
+ return f
501
+ ' language pltcl;
502
+
475
503
create operator @< (
476
504
leftarg = int4,
477
505
rightarg = int4,
478
506
procedure = tcl_int4lt
479
507
);
480
508
509
+ create operator @<= (
510
+ leftarg = int4,
511
+ rightarg = int4,
512
+ procedure = tcl_int4le
513
+ );
514
+
515
+ create operator @= (
516
+ leftarg = int4,
517
+ rightarg = int4,
518
+ procedure = tcl_int4eq
519
+ );
520
+
521
+ create operator @>= (
522
+ leftarg = int4,
523
+ rightarg = int4,
524
+ procedure = tcl_int4ge
525
+ );
526
+
527
+ create operator @> (
528
+ leftarg = int4,
529
+ rightarg = int4,
530
+ procedure = tcl_int4gt
531
+ );
532
+
533
+ create function tcl_int4cmp (int4,int4) returns int4 as '
534
+ if {$1 < $2} {
535
+ return -1
536
+ }
537
+ if {$1 > $2} {
538
+ return 1
539
+ }
540
+ return 0
541
+ ' language pltcl;
542
+
543
+ CREATE OPERATOR CLASS tcl_int4_ops
544
+ FOR TYPE int4 USING btree AS
545
+ OPERATOR 1 @< ,
546
+ OPERATOR 2 @<= ,
547
+ OPERATOR 3 @= ,
548
+ OPERATOR 4 @>= ,
549
+ OPERATOR 5 @> ,
550
+ FUNCTION 1 tcl_int4cmp(int4,int4) ;
You can’t perform that action at this time.
0 commit comments