mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-18 18:44:06 +08:00
Remove deprecated containment operators for built-in types
Remove old containment operators @ and ~ for built-in geometry data types. These have been deprecated; use <@ and @> instead. (Some contrib modules still contain the same deprecated operators. That will be dealt with separately.) Author: Justin Pryzby <pryzby@telsasoft.com> Discussion: https://www.postgresql.org/message-id/flat/20201027032511.GF9241@telsasoft.com
This commit is contained in:
parent
44a184cb68
commit
2f70fdb064
@ -10890,15 +10890,6 @@ CREATE TYPE rainbow AS ENUM ('red', 'orange', 'yellow', 'green', 'blue', 'purple
|
||||
</para>
|
||||
</caution>
|
||||
|
||||
<note>
|
||||
<para>
|
||||
Before <productname>PostgreSQL</productname> 8.2, the containment
|
||||
operators <literal>@></literal> and <literal><@</literal> were respectively
|
||||
called <literal>~</literal> and <literal>@</literal>. These names are still
|
||||
available, but are deprecated and will eventually be removed.
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<table id="functions-geometry-func-table">
|
||||
<title>Geometric Functions</title>
|
||||
<tgroup cols="1">
|
||||
|
@ -53,6 +53,6 @@
|
||||
*/
|
||||
|
||||
/* yyyymmddN */
|
||||
#define CATALOG_VERSION_NO 202011013
|
||||
#define CATALOG_VERSION_NO 202011031
|
||||
|
||||
#endif
|
||||
|
@ -1100,10 +1100,6 @@
|
||||
amopstrategy => '11', amopopr => '|>>(box,box)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
|
||||
amopstrategy => '12', amopopr => '|&>(box,box)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
|
||||
amopstrategy => '13', amopopr => '~(box,box)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'box',
|
||||
amopstrategy => '14', amopopr => '@(box,box)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/box_ops', amoplefttype => 'box', amoprighttype => 'point',
|
||||
amopstrategy => '15', amoppurpose => 'o', amopopr => '<->(box,point)',
|
||||
amopmethod => 'gist', amopsortfamily => 'btree/float_ops' },
|
||||
@ -1175,12 +1171,6 @@
|
||||
{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
|
||||
amoprighttype => 'polygon', amopstrategy => '12',
|
||||
amopopr => '|&>(polygon,polygon)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
|
||||
amoprighttype => 'polygon', amopstrategy => '13',
|
||||
amopopr => '~(polygon,polygon)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
|
||||
amoprighttype => 'polygon', amopstrategy => '14',
|
||||
amopopr => '@(polygon,polygon)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/poly_ops', amoplefttype => 'polygon',
|
||||
amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o',
|
||||
amopopr => '<->(polygon,point)', amopmethod => 'gist',
|
||||
@ -1223,12 +1213,6 @@
|
||||
{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
|
||||
amoprighttype => 'circle', amopstrategy => '12',
|
||||
amopopr => '|&>(circle,circle)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
|
||||
amoprighttype => 'circle', amopstrategy => '13',
|
||||
amopopr => '~(circle,circle)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
|
||||
amoprighttype => 'circle', amopstrategy => '14',
|
||||
amopopr => '@(circle,circle)', amopmethod => 'gist' },
|
||||
{ amopfamily => 'gist/circle_ops', amoplefttype => 'circle',
|
||||
amoprighttype => 'point', amopstrategy => '15', amoppurpose => 'o',
|
||||
amopopr => '<->(circle,point)', amopmethod => 'gist',
|
||||
@ -2454,8 +2438,6 @@
|
||||
amoprighttype => 'box', amopstrategy => '12', amopopr => '|&>(box,box)',
|
||||
amopmethod => 'brin' },
|
||||
|
||||
# we could, but choose not to, supply entries for strategies 13 and 14
|
||||
|
||||
{ amopfamily => 'brin/box_inclusion_ops', amoplefttype => 'box',
|
||||
amoprighttype => 'point', amopstrategy => '7', amopopr => '@>(box,point)',
|
||||
amopmethod => 'brin' },
|
||||
|
@ -2777,71 +2777,6 @@
|
||||
oprname => '||', oprleft => 'anynonarray', oprright => 'text',
|
||||
oprresult => 'text', oprcode => 'anytextcat' },
|
||||
|
||||
# obsolete names for contains/contained-by operators; remove these someday
|
||||
{ oid => '2860', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'polygon', oprright => 'polygon',
|
||||
oprresult => 'bool', oprcom => '~(polygon,polygon)',
|
||||
oprcode => 'poly_contained', oprrest => 'contsel', oprjoin => 'contjoinsel' },
|
||||
{ oid => '2861', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => 'polygon', oprright => 'polygon',
|
||||
oprresult => 'bool', oprcom => '@(polygon,polygon)',
|
||||
oprcode => 'poly_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' },
|
||||
{ oid => '2862', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'box', oprright => 'box', oprresult => 'bool',
|
||||
oprcom => '~(box,box)', oprcode => 'box_contained', oprrest => 'contsel',
|
||||
oprjoin => 'contjoinsel' },
|
||||
{ oid => '2863', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => 'box', oprright => 'box', oprresult => 'bool',
|
||||
oprcom => '@(box,box)', oprcode => 'box_contain', oprrest => 'contsel',
|
||||
oprjoin => 'contjoinsel' },
|
||||
{ oid => '2864', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'circle', oprright => 'circle',
|
||||
oprresult => 'bool', oprcom => '~(circle,circle)',
|
||||
oprcode => 'circle_contained', oprrest => 'contsel',
|
||||
oprjoin => 'contjoinsel' },
|
||||
{ oid => '2865', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => 'circle', oprright => 'circle',
|
||||
oprresult => 'bool', oprcom => '@(circle,circle)',
|
||||
oprcode => 'circle_contain', oprrest => 'contsel', oprjoin => 'contjoinsel' },
|
||||
{ oid => '2866', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'point', oprright => 'box', oprresult => 'bool',
|
||||
oprcode => 'on_pb' },
|
||||
{ oid => '2867', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'point', oprright => 'path', oprresult => 'bool',
|
||||
oprcom => '~(path,point)', oprcode => 'on_ppath' },
|
||||
{ oid => '2868', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => 'path', oprright => 'point', oprresult => 'bool',
|
||||
oprcom => '@(point,path)', oprcode => 'path_contain_pt' },
|
||||
{ oid => '2869', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'point', oprright => 'polygon',
|
||||
oprresult => 'bool', oprcom => '~(polygon,point)',
|
||||
oprcode => 'pt_contained_poly' },
|
||||
{ oid => '2870', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => 'polygon', oprright => 'point',
|
||||
oprresult => 'bool', oprcom => '@(point,polygon)',
|
||||
oprcode => 'poly_contain_pt' },
|
||||
{ oid => '2871', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'point', oprright => 'circle', oprresult => 'bool',
|
||||
oprcom => '~(circle,point)', oprcode => 'pt_contained_circle' },
|
||||
{ oid => '2872', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => 'circle', oprright => 'point', oprresult => 'bool',
|
||||
oprcom => '@(point,circle)', oprcode => 'circle_contain_pt' },
|
||||
{ oid => '2873', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'point', oprright => 'line', oprresult => 'bool',
|
||||
oprcode => 'on_pl' },
|
||||
{ oid => '2874', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'point', oprright => 'lseg', oprresult => 'bool',
|
||||
oprcode => 'on_ps' },
|
||||
{ oid => '2875', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'lseg', oprright => 'line', oprresult => 'bool',
|
||||
oprcode => 'on_sl' },
|
||||
{ oid => '2876', descr => 'deprecated, use <@ instead',
|
||||
oprname => '@', oprleft => 'lseg', oprright => 'box', oprresult => 'bool',
|
||||
oprcode => 'on_sb' },
|
||||
{ oid => '2877', descr => 'deprecated, use @> instead',
|
||||
oprname => '~', oprleft => '_aclitem', oprright => 'aclitem',
|
||||
oprresult => 'bool', oprcode => 'aclcontains' },
|
||||
|
||||
# uuid operators
|
||||
{ oid => '2972', descr => 'equal',
|
||||
oprname => '=', oprcanmerge => 't', oprcanhash => 't', oprleft => 'uuid',
|
||||
|
@ -27,8 +27,6 @@ CREATE OPERATOR CLASS box_ops DEFAULT
|
||||
OPERATOR 10 <<|,
|
||||
OPERATOR 11 |>>,
|
||||
OPERATOR 12 |&>,
|
||||
OPERATOR 13 ~,
|
||||
OPERATOR 14 @,
|
||||
FUNCTION 1 gist_box_consistent(internal, box, smallint, oid, internal),
|
||||
FUNCTION 2 gist_box_union(internal, internal),
|
||||
-- don't need compress, decompress, or fetch functions
|
||||
|
@ -1163,14 +1163,13 @@ ORDER BY 1, 2;
|
||||
?-| | ?-|
|
||||
?| | ?|
|
||||
?|| | ?||
|
||||
@ | ~
|
||||
@@ | @@
|
||||
@@@ | @@@
|
||||
| | |
|
||||
~<=~ | ~>=~
|
||||
~<~ | ~>~
|
||||
~= | ~=
|
||||
(30 rows)
|
||||
(29 rows)
|
||||
|
||||
-- Likewise for negator pairs.
|
||||
SELECT DISTINCT o1.oprname AS op1, o2.oprname AS op2
|
||||
@ -1990,8 +1989,6 @@ ORDER BY 1, 2, 3;
|
||||
783 | 11 | >^
|
||||
783 | 11 | |>>
|
||||
783 | 12 | |&>
|
||||
783 | 13 | ~
|
||||
783 | 14 | @
|
||||
783 | 15 | <->
|
||||
783 | 16 | @>
|
||||
783 | 18 | =
|
||||
@ -2084,7 +2081,7 @@ ORDER BY 1, 2, 3;
|
||||
4000 | 26 | >>
|
||||
4000 | 27 | >>=
|
||||
4000 | 28 | ^@
|
||||
(125 rows)
|
||||
(123 rows)
|
||||
|
||||
-- Check that all opclass search operators have selectivity estimators.
|
||||
-- This is not absolutely required, but it seems a reasonable thing
|
||||
|
@ -28,8 +28,6 @@ CREATE OPERATOR CLASS box_ops DEFAULT
|
||||
OPERATOR 10 <<|,
|
||||
OPERATOR 11 |>>,
|
||||
OPERATOR 12 |&>,
|
||||
OPERATOR 13 ~,
|
||||
OPERATOR 14 @,
|
||||
FUNCTION 1 gist_box_consistent(internal, box, smallint, oid, internal),
|
||||
FUNCTION 2 gist_box_union(internal, internal),
|
||||
-- don't need compress, decompress, or fetch functions
|
||||
|
Loading…
Reference in New Issue
Block a user