summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorAlvaro Herrera2022-07-22 17:23:39 +0000
committerAlvaro Herrera2022-07-22 17:23:39 +0000
commit83011ce7d7f42b744a93d2b0819597d0aa94e9cc (patch)
treec12cf093064b723cc538d5fef052342330f4d258 /src/test
parent0b292bed9211e5c85b7b102690f526c3a6600c2e (diff)
Rework grammar for REINDEX
The part of grammar have grown needlessly duplicative and more complex that necessary. Rewrite. Reviewed-by: Michaƫl Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/20220721174212.cmitjpuimx6ssyyj@alvherre.pgsql
Diffstat (limited to 'src/test')
-rw-r--r--src/test/regress/expected/create_index.out6
-rw-r--r--src/test/regress/sql/create_index.sql2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index d55aec3a1d0..a913a1846f9 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -2521,6 +2521,12 @@ ERROR: cannot reindex system catalogs concurrently
REINDEX INDEX CONCURRENTLY pg_toast.pg_toast_1260_index; -- no catalog toast index
ERROR: cannot reindex system catalogs concurrently
REINDEX SYSTEM CONCURRENTLY postgres; -- not allowed for SYSTEM
+ERROR: syntax error at or near "CONCURRENTLY"
+LINE 1: REINDEX SYSTEM CONCURRENTLY postgres;
+ ^
+REINDEX (CONCURRENTLY) SYSTEM postgres; -- ditto
+ERROR: cannot reindex system catalogs concurrently
+REINDEX (CONCURRENTLY) SYSTEM; -- ditto
ERROR: cannot reindex system catalogs concurrently
-- Warns about catalog relations
REINDEX SCHEMA CONCURRENTLY pg_catalog;
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index d8fded3d930..4b75790e472 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -1072,6 +1072,8 @@ REINDEX INDEX CONCURRENTLY pg_class_oid_index; -- no catalog index
REINDEX TABLE CONCURRENTLY pg_toast.pg_toast_1260; -- no catalog toast table
REINDEX INDEX CONCURRENTLY pg_toast.pg_toast_1260_index; -- no catalog toast index
REINDEX SYSTEM CONCURRENTLY postgres; -- not allowed for SYSTEM
+REINDEX (CONCURRENTLY) SYSTEM postgres; -- ditto
+REINDEX (CONCURRENTLY) SYSTEM; -- ditto
-- Warns about catalog relations
REINDEX SCHEMA CONCURRENTLY pg_catalog;