|
4 | 4 | -- pg_operator, pg_proc, pg_cast, pg_aggregate, pg_am,
|
5 | 5 | -- pg_amop, pg_amproc, pg_opclass, pg_opfamily.
|
6 | 6 | --
|
7 |
| --- Every test failures in this file should be closely inspected. The |
8 |
| --- description of the failing test should be read carefully before |
9 |
| --- adjusting the expected output. |
| 7 | +-- Every test failure in this file should be closely inspected. |
| 8 | +-- The description of the failing test should be read carefully before |
| 9 | +-- adjusting the expected output. In most cases, the queries should |
| 10 | +-- not find *any* matching entries. |
10 | 11 | --
|
11 | 12 | -- NB: we assume the oidjoins test will have caught any dangling links,
|
12 | 13 | -- that is OID or REGPROC fields that are not zero and do not match some
|
@@ -844,6 +845,72 @@ WHERE p1.oprnegate = p2.oid AND
|
844 | 845 | -----+---------+-----+---------
|
845 | 846 | (0 rows)
|
846 | 847 |
|
| 848 | +-- Make a list of the names of operators that are claimed to be commutator |
| 849 | +-- pairs. This list will grow over time, but before accepting a new entry |
| 850 | +-- make sure you didn't link the wrong operators. |
| 851 | +SELECT DISTINCT o1.oprname AS op1, o2.oprname AS op2 |
| 852 | +FROM pg_operator o1, pg_operator o2 |
| 853 | +WHERE o1.oprcom = o2.oid AND o1.oprname <= o2.oprname |
| 854 | +ORDER BY 1, 2; |
| 855 | + op1 | op2 |
| 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 | +(30 rows) |
| 888 | + |
| 889 | +-- Likewise for negator pairs. |
| 890 | +SELECT DISTINCT o1.oprname AS op1, o2.oprname AS op2 |
| 891 | +FROM pg_operator o1, pg_operator o2 |
| 892 | +WHERE o1.oprnegate = o2.oid AND o1.oprname <= o2.oprname |
| 893 | +ORDER BY 1, 2; |
| 894 | + op1 | op2 |
| 895 | +------+------ |
| 896 | + !~ | ~ |
| 897 | + !~* | ~* |
| 898 | + !~~ | ~~ |
| 899 | + !~~* | ~~* |
| 900 | + #< | #>= |
| 901 | + #<= | #> |
| 902 | + #<> | #= |
| 903 | + *< | *>= |
| 904 | + *<= | *> |
| 905 | + *<> | *= |
| 906 | + < | >= |
| 907 | + <= | > |
| 908 | + <> | = |
| 909 | + <> | ~= |
| 910 | + ~<=~ | ~>~ |
| 911 | + ~<~ | ~>=~ |
| 912 | +(16 rows) |
| 913 | + |
847 | 914 | -- A mergejoinable or hashjoinable operator must be binary, must return
|
848 | 915 | -- boolean, and must have a commutator (itself, unless it's a cross-type
|
849 | 916 | -- operator).
|
|
0 commit comments