Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow creating different types of indexes and/or return more information about an index type #378

Open
eemmiillyy opened this issue Jul 29, 2024 · 3 comments · May be fixed by #417
Open
Assignees
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@eemmiillyy
Copy link

This is a feature request:

  • It would be useful to allow creating indexes other than btree via pgroll.
  • It would also be useful to have information created about index types created (also via SQL) on the schema so that we can reconstruct the create index statement for the user that was run.
@exekias exekias added good first issue Good for newcomers help wanted Extra attention is needed hacktoberfest labels Oct 3, 2024
@kvch kvch self-assigned this Oct 18, 2024
@kvch
Copy link
Contributor

kvch commented Oct 18, 2024

What do you want to do with the reconstructed command? I can return the complete index definition statement. However, with pgroll we create the index concurrently (to avoid locking tables) and the reconstructed statement does not contain it by default.

@eemmiillyy
Copy link
Author

I want to be able to list the indexes. I also want to be able to show example SQL for creating indexes.

Probably returning just the index definition is enough and we don't need to reconstruct any statements.

Does that make sense? @kvch

@kvch
Copy link
Contributor

kvch commented Oct 18, 2024

The index definition we can get from PostgreSQL is a complete statement for creating the index e.g. CREATE INDEX idx_users_name_hash ON public.users USING hash (name) WITH (fillfactor='70'). But it seems you also need index type and other info for pretty displays.

@kvch kvch linked a pull request Oct 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants