Skip to content

Refactor: normalize SQL index names with IX_ convention#3494

Closed
Copilot wants to merge 3 commits intomasterfrom
copilot/refactor-index-naming-convention
Closed

Refactor: normalize SQL index names with IX_ convention#3494
Copilot wants to merge 3 commits intomasterfrom
copilot/refactor-index-naming-convention

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

Remove-me-section

  • Please review SQL index naming updates across Oracle, SQL Server, and Postgres scripts.

Generic request

  • PR name follows the pattern #1234 – issue name
  • branch name does not contain '#'
  • base branch (master or release/xx) is correct
  • PR is linked with the issue
  • task status changed to "Code review"
  • code follows product standards
  • regression tests updated

For release/xx branch

  • backmerge to master (or newer release/xx) branch is created

Optional

  • unit-tests written
  • documentation updated

Backmerge request

  • PR name follows the pattern Backmerge: #1234 – issue name
  • PR is linked with the issue
  • base branch (master or release/xx) is correct
  • code contains only backmerge changes

Bump request

  • PR name follows the pattern Bump version to ...
  • add brackets [ ] for 'skip ci' and put it into the body
  • milestone is linked to PR
  • all tickets are closed inside the relevant milestone

Description

Defined index names did not follow the recommended IX_ prefix convention across Oracle, SQL Server, and Postgres assets, and some Postgres test indexes retained redundant _idx suffixes.

Summary of changes

  • Oracle: renamed config-related indexes to IX_* in bingo_config.sql.
  • SQL Server: prefixed CONFIG, CONFIG_BIN, and CONTEXT indexes with IX_ in bingo_create.sql.
  • Postgres: prefixed all test SQL index definitions/drops and regclass references with IX_, removed redundant _idx suffixes, and aligned related precache/metadata lookups.
  • Test fixtures: adjusted example index to IX_compound to avoid redundant naming.

Example

-- Before
CREATE INDEX test_idx ON test_table USING gist (mol gist_bingo_ops);

-- After
CREATE INDEX IX_test ON test_table USING gist (mol gist_bingo_ops);
Original prompt

This section details on the original issue you should resolve

<issue_title>Refactor: Defined index name is not using recommended naming convention</issue_title>
<issue_description>Problem:
INDEX is not using recommended naming convention

Why is this an issue?

Description
Defined index name is not using recommended naming convention to start with IX_.

Code examples

Non-compliant

CREATE UNIQUE INDEX Test_Name on dbo.test (Name);

Compliant

CREATE UNIQUE INDEX IX_Test_Name on dbo.test (Name);

Problem locations:
bingo/oracle/sql/bingo/bingo_config.sql:21
bingo/oracle/sql/bingo/bingo_config.sql:23
bingo/oracle/sql/bingo/bingo_config.sql:25
bingo/oracle/sql/bingo/bingo_config.sql:27
bingo/oracle/sql/bingo/bingo_config.sql:29
bingo/postgres/tests/local/postgres_test.sql:9
bingo/postgres/tests/local/postgres_test.sql:10
bingo/postgres/tests/local/postgres_test.sql:11
bingo/postgres/tests/local/postgres_test.sql:15
bingo/postgres/tests/local/postgres_test.sql:42
bingo/postgres/tests/local/postgres_test.sql:83
bingo/postgres/tests/local/postgres_test.sql:84
bingo/postgres/tests/local/postgres_test.sql:124
bingo/postgres/tests/local/postgres_test.sql:143
bingo/postgres/tests/local/postgres_test.sql:156
bingo/postgres/tests/local/postgres_test.sql:356
bingo/postgres/tests/local/postgres_test.sql:372
bingo/postgres/tests/local/postgres_test.sql:473
bingo/postgres/tests/local/postgres_test.sql:509
bingo/postgres/tests/local/postgres_test.sql:533
bingo/postgres/tests/local/postgres_test.sql:579
bingo/postgres/tests/local/postgres_test.sql:620
bingo/postgres/tests/local/postgres_test.sql:629
bingo/postgres/tests/local/postgres_test.sql:643
bingo/postgres/tests/local/postgres_test.sql:657
bingo/postgres/tests/local/postgres_test.sql:666
bingo/postgres/tests/local/postgres_test.sql:676
bingo/postgres/tests/local/postgres_test.sql:708
bingo/postgres/tests/local/postgres_test.sql:720
bingo/postgres/tests/local/postgres_test.sql:742
bingo/postgres/tests/local/postgres_test.sql:750
bingo/postgres/tests/local/postgres_test.sql:760
bingo/postgres/tests/local/postgres_test.sql:803
bingo/postgres/tests/local/postgres_test.sql:820
bingo/postgres/tests/local/postgres_test.sql:850
bingo/postgres/tests/local/postgres_test.sql:878
bingo/postgres/tests/local/postgres_test.sql:879
bingo/postgres/tests/local/postgres_test.sql:880
bingo/postgres/tests/local/postgres_test.sql:881
bingo/postgres/tests/local/postgres_test.sql:883
bingo/postgres/tests/local/postgres_test.sql:884
bingo/postgres/tests/local/postgres_test.sql:920
bingo/postgres/tests/local/postgres_test.sql:923
bingo/postgres/tests/local/postgres_test.sql:972
bingo/postgres/tests/local/postgres_test.sql:980
bingo/postgres/tests/local/postgres_test.sql:1045
bingo/postgres/tests/local/postgres_test.sql:1067
bingo/postgres/tests/local/postgres_test.sql:1085
bingo/postgres/tests/local/postgres_test.sql:1096
bingo/postgres/tests/local/postgres_test.sql:1100
bingo/postgres/tests/local/postgres_test.sql:1121
bingo/postgres/tests/local/postgres_test.sql:1137
bingo/postgres/tests/local/postgres_test.sql:1149
bingo/postgres/tests/local/postgres_test.sql:1173
bingo/sqlserver/sql/bingo_create.sql:71
bingo/sqlserver/sql/bingo_create.sql:98
bingo/sqlserver/sql/bingo_create.sql:103
bingo/tests/data/molecules/exact/import/targets/exact_join.sql:27</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor index names to use recommended naming convention Refactor: prefix SQL indexes with IX_ convention Feb 15, 2026
Copilot AI requested a review from AlexeyGirin February 15, 2026 21:25
@AlexeyGirin
Copy link
Collaborator

@copilot if index name you modified has '_idx' at the end, please remove '_idx'

Co-authored-by: AlexeyGirin <26869421+AlexeyGirin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 16, 2026

@copilot if index name you modified has '_idx' at the end, please remove '_idx'

Adjusted renamed PostgreSQL indexes to drop the trailing _idx while keeping the IX_ prefix; changes in commit 972f8e5.

Copilot AI changed the title Refactor: prefix SQL indexes with IX_ convention Refactor: normalize SQL index names with IX_ convention Feb 16, 2026
@AlexeyGirin AlexeyGirin marked this pull request as ready for review February 16, 2026 06:51
@AlexeyGirin AlexeyGirin requested review from AliaksandrDziarkach and removed request for AlexeyGirin February 16, 2026 07:09
@AlexeyGirin AlexeyGirin reopened this Feb 17, 2026
@AlexeyGirin AlexeyGirin reopened this Feb 18, 2026
@AlexeyGirin
Copy link
Collaborator

@copilot please rebase branch to last master branch

Copy link
Contributor Author

Copilot AI commented Feb 20, 2026

@copilot please rebase branch to last master branch

I’m unable to rebase or pull from master in this environment. Please rebase the branch onto the latest master, and I can continue with any follow-up fixes afterward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Defined index name is not using recommended naming convention (Rule ID:SQLCC:C013) rule from SonarQube scan results

2 participants