Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 7da1bdc

Browse files
committed
Remove obsolete RECHECK keyword completely
This used to be part of CREATE OPERATOR CLASS and ALTER OPERATOR FAMILY, but it has done nothing (except issue a NOTICE) since PostgreSQL 8.4. Commit 30e7c17 removed support for dumping from pre-9.2 servers, so this no longer serves any need. This now removes it completely, and you'd get a normal parse error if you used it. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://www.postgresql.org/message-id/flat/113ef2d2-3657-4353-be97-f28fceddbca1%40eisentraut.org
1 parent 701cf1e commit 7da1bdc

File tree

5 files changed

+4
-41
lines changed

5 files changed

+4
-41
lines changed

doc/src/sgml/ref/alter_opfamily.sgml

-8
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,6 @@ ALTER OPERATOR FAMILY <replaceable>name</replaceable> USING <replaceable class="
273273
is likely to be inlined into the calling query, which will prevent
274274
the optimizer from recognizing that the query matches an index.
275275
</para>
276-
277-
<para>
278-
Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</literal>
279-
clause could include a <literal>RECHECK</literal> option. This is no longer
280-
supported because whether an index operator is <quote>lossy</quote> is now
281-
determined on-the-fly at run time. This allows efficient handling of
282-
cases where an operator might or might not be lossy.
283-
</para>
284276
</refsect1>
285277

286278
<refsect1>

doc/src/sgml/ref/create_opclass.sgml

-8
Original file line numberDiff line numberDiff line change
@@ -269,14 +269,6 @@ CREATE OPERATOR CLASS <replaceable class="parameter">name</replaceable> [ DEFAUL
269269
is likely to be inlined into the calling query, which will prevent
270270
the optimizer from recognizing that the query matches an index.
271271
</para>
272-
273-
<para>
274-
Before <productname>PostgreSQL</productname> 8.4, the <literal>OPERATOR</literal>
275-
clause could include a <literal>RECHECK</literal> option. This is no longer
276-
supported because whether an index operator is <quote>lossy</quote> is now
277-
determined on-the-fly at run time. This allows efficient handling of
278-
cases where an operator might or might not be lossy.
279-
</para>
280272
</refsect1>
281273

282274
<refsect1>

src/backend/parser/gram.y

+3-23
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
495495

496496
%type <boolean> opt_instead
497497
%type <boolean> opt_unique opt_verbose opt_full
498-
%type <boolean> opt_freeze opt_analyze opt_default opt_recheck
498+
%type <boolean> opt_freeze opt_analyze opt_default
499499
%type <defelt> opt_binary copy_delimiter
500500

501501
%type <boolean> copy_from opt_program
@@ -770,7 +770,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
770770

771771
QUOTE QUOTES
772772

773-
RANGE READ REAL REASSIGN RECHECK RECURSIVE REF_P REFERENCES REFERENCING
773+
RANGE READ REAL REASSIGN RECURSIVE REF_P REFERENCES REFERENCING
774774
REFRESH REINDEX RELATIVE_P RELEASE RENAME REPEATABLE REPLACE REPLICA
775775
RESET RESTART RESTRICT RETURN RETURNING RETURNS REVOKE RIGHT ROLE ROLLBACK ROLLUP
776776
ROUTINE ROUTINES ROW ROWS RULE
@@ -6622,7 +6622,7 @@ opclass_item_list:
66226622
;
66236623

66246624
opclass_item:
6625-
OPERATOR Iconst any_operator opclass_purpose opt_recheck
6625+
OPERATOR Iconst any_operator opclass_purpose
66266626
{
66276627
CreateOpClassItem *n = makeNode(CreateOpClassItem);
66286628
ObjectWithArgs *owa = makeNode(ObjectWithArgs);
@@ -6636,7 +6636,6 @@ opclass_item:
66366636
$$ = (Node *) n;
66376637
}
66386638
| OPERATOR Iconst operator_with_argtypes opclass_purpose
6639-
opt_recheck
66406639
{
66416640
CreateOpClassItem *n = makeNode(CreateOpClassItem);
66426641

@@ -6688,23 +6687,6 @@ opclass_purpose: FOR SEARCH { $$ = NIL; }
66886687
| /*EMPTY*/ { $$ = NIL; }
66896688
;
66906689

6691-
opt_recheck: RECHECK
6692-
{
6693-
/*
6694-
* RECHECK no longer does anything in opclass definitions,
6695-
* but we still accept it to ease porting of old database
6696-
* dumps.
6697-
*/
6698-
ereport(NOTICE,
6699-
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
6700-
errmsg("RECHECK is no longer required"),
6701-
errhint("Update your data type."),
6702-
parser_errposition(@1)));
6703-
$$ = true;
6704-
}
6705-
| /*EMPTY*/ { $$ = false; }
6706-
;
6707-
67086690

67096691
CreateOpFamilyStmt:
67106692
CREATE OPERATOR FAMILY any_name USING name
@@ -17784,7 +17766,6 @@ unreserved_keyword:
1778417766
| RANGE
1778517767
| READ
1778617768
| REASSIGN
17787-
| RECHECK
1778817769
| RECURSIVE
1778917770
| REF_P
1779017771
| REFERENCING
@@ -18414,7 +18395,6 @@ bare_label_keyword:
1841418395
| READ
1841518396
| REAL
1841618397
| REASSIGN
18417-
| RECHECK
1841818398
| RECURSIVE
1841918399
| REF_P
1842018400
| REFERENCES

src/include/parser/kwlist.h

-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,6 @@ PG_KEYWORD("range", RANGE, UNRESERVED_KEYWORD, BARE_LABEL)
363363
PG_KEYWORD("read", READ, UNRESERVED_KEYWORD, BARE_LABEL)
364364
PG_KEYWORD("real", REAL, COL_NAME_KEYWORD, BARE_LABEL)
365365
PG_KEYWORD("reassign", REASSIGN, UNRESERVED_KEYWORD, BARE_LABEL)
366-
PG_KEYWORD("recheck", RECHECK, UNRESERVED_KEYWORD, BARE_LABEL)
367366
PG_KEYWORD("recursive", RECURSIVE, UNRESERVED_KEYWORD, BARE_LABEL)
368367
PG_KEYWORD("ref", REF_P, UNRESERVED_KEYWORD, BARE_LABEL)
369368
PG_KEYWORD("references", REFERENCES, RESERVED_KEYWORD, BARE_LABEL)

src/test/isolation/specs/merge-match-recheck.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MERGE MATCHED RECHECK
1+
# MERGE MATCHED recheck
22
#
33
# This test looks at what happens when we have complex
44
# WHEN MATCHED AND conditions and a concurrent UPDATE causes a

0 commit comments

Comments
 (0)