-
Notifications
You must be signed in to change notification settings - Fork 94
Index name case sensitivity issue when inserting record #285
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Bug Description
pg_textsearch extension fails to find BM25 indexes created with quoted identifiers due to case sensitivity mismatch. When creating an index with a quoted name like "IX_aaa_content", subsequent INSERT operations fail with a "index not found" error because the extension appears to search for the lowercase version of the index name.
Environment
- PostgreSQL version: 18.3
- pg_textsearch version: 0.6.0
- Operating system: Debian 13.3
Steps to Reproduce
- Create a table with a text column
- Create a BM25 index with quoted identifier (uppercase)
- Insert a record into the table
CREATE TABLE aaa
(
id SERIAL PRIMARY KEY,
content TEXT
);
CREATE INDEX "IX_aaa_content" ON aaa USING bm25(content) WITH (text_config='english');
INSERT INTO aaa (content) VALUES ('lorem ipsum');Expected Behavior
The INSERT operation should succeed normally, with the BM25 index being updated properly.
Actual Behavior
The extension cannot locate the index despite it being created successfully. The issue appears to be case sensitivity - pg_textsearch likely searches for ix_aaa_content (lowercase) internally while the index exists as IX_aaa_content.
[42P01] ERROR: index "public.IX_aaa_content" not found
Additional Context
- Works fine when using unquoted index names (lowercase by default)
- Confirmed the index exists: SELECT * FROM pg_indexes WHERE indexname = 'IX_aaa_content'; returns the index
- Issue specific to quoted identifiers with uppercase letters
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working