jakob / jakob/Postico

autogenerated index name already taken

Open
#865 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
485
Forks
8
PR merge metrics
No merged PRs in 30d

Description

I just had a situation, where I wanted to create a second (partial + unique) index for a column that already has an index. Postico autogenerates a name, but since I already created a reqular index for the same column and the partial/unique-ness isn't reflected in the generated index name, the names clash.

Since postgres autogenerates an index name anyway, why submit one at all? Is this not true for all PG versions? Otherwise Postico should check if the name will clash and change the generated name.

![SCR-20231201-myi](https://github.com/jakob/Postico/assets/384993/2b6c559d-8dba-495b-a543-1a31930d1758)

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named in the issue. Start by locating Postico's PostgreSQL index-creation flow and determine whether generated names are submitted or left to PostgreSQL; done means resolving the name collision for regular and partial/unique indexes across supported PostgreSQL versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, python
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.