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

Add new functions index_is_partial #342

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

rodo
Copy link
Contributor

@rodo rodo commented Oct 25, 2024

Add new function to check partial indexes as requested in #334

Copy link

@halostatue halostatue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not at the job where I needed this, but this looks like it would do exactly what I wanted for partial index detection. It doesn't (yet?) implement the index_partial_clause_is test, but that was always secondary from my perspective.

@rodo
Copy link
Contributor Author

rodo commented Oct 25, 2024

Happy to read this @halostatue
For index_partial_clause_is work is in progress, if I finish it in time I'll put it in the same PR.

Copy link
Owner

@theory theory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, aside from the wrong function names in the upgrade script. Please also rebase on main. Thanks!

sql/pgtap--1.3.3--1.3.4.sql Outdated Show resolved Hide resolved
sql/pgtap.sql.in Outdated Show resolved Hide resolved
sql/pgtap--1.3.3--1.3.4.sql Outdated Show resolved Hide resolved
$$ LANGUAGE sql;

-- index_is_partial( table, index )
CREATE OR REPLACE FUNCTION index_is_partial ( NAME, NAME )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these can be pure SQL I think.

Co-authored-by: David E. Wheeler <46604+theory@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants