Typo in create_index regression test
While looking at create_index.sql, I noticed the following:
--
-- Check handling of indexes on system columns
--
CREATE TABLE syscol_table (a INT);
-- System columns cannot be indexed
CREATE INDEX ON syscolcol_table (ctid);
which isn't testing what it claims to test because there's a typo in
the table name. Patch attached.
Regards,
Dean
Attachments:
v1-0001-Fix-typo-in-create_index.sql.patchtext/x-patch; charset=US-ASCII; name=v1-0001-Fix-typo-in-create_index.sql.patchDownload
From eb98319fac5bb767b5d88b0efeb1b2414b78b78c Mon Sep 17 00:00:00 2001
From: Dean Rasheed <dean.a.rasheed@gmail.com>
Date: Mon, 4 Aug 2025 15:02:40 +0100
Subject: [PATCH v1] Fix typo in create_index.sql.
Introduced by 578b229718e.
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Discussion: https://postgr.es/m/...
Backpatch-through: 13
---
src/test/regress/expected/create_index.out | 4 ++--
src/test/regress/sql/create_index.sql | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out
index 9ade7b835e6..98e68e972be 100644
--- a/src/test/regress/expected/create_index.out
+++ b/src/test/regress/expected/create_index.out
@@ -1624,8 +1624,8 @@ DROP TABLE cwi_test;
--
CREATE TABLE syscol_table (a INT);
-- System columns cannot be indexed
-CREATE INDEX ON syscolcol_table (ctid);
-ERROR: relation "syscolcol_table" does not exist
+CREATE INDEX ON syscol_table (ctid);
+ERROR: index creation on system columns is not supported
-- nor used in expressions
CREATE INDEX ON syscol_table ((ctid >= '(1000,0)'));
ERROR: index creation on system columns is not supported
diff --git a/src/test/regress/sql/create_index.sql b/src/test/regress/sql/create_index.sql
index e21ff426519..eabc9623b20 100644
--- a/src/test/regress/sql/create_index.sql
+++ b/src/test/regress/sql/create_index.sql
@@ -635,7 +635,7 @@ DROP TABLE cwi_test;
CREATE TABLE syscol_table (a INT);
-- System columns cannot be indexed
-CREATE INDEX ON syscolcol_table (ctid);
+CREATE INDEX ON syscol_table (ctid);
-- nor used in expressions
CREATE INDEX ON syscol_table ((ctid >= '(1000,0)'));
--
2.43.0
Dean Rasheed <dean.a.rasheed@gmail.com> 于2025年8月4日周一 22:10写道:
While looking at create_index.sql, I noticed the following:
--
-- Check handling of indexes on system columns
--
CREATE TABLE syscol_table (a INT);-- System columns cannot be indexed
CREATE INDEX ON syscolcol_table (ctid);which isn't testing what it claims to test because there's a typo in
the table name. Patch attached.
Good catch.
LGTM.
--
Thanks,
Tender Wang
On Mon, 4 Aug 2025 at 15:18, Tender Wang <tndrwang@gmail.com> wrote:
Dean Rasheed <dean.a.rasheed@gmail.com> 于2025年8月4日周一 22:10写道:
While looking at create_index.sql, I noticed the following:
which isn't testing what it claims to test because there's a typo in
the table name. Patch attached.Good catch.
LGTM.
Pushed. Thanks for looking.
Regards,
Dean