Skip to content

Support Partial Indexes syntax(PostgreSQL) #41

Merged
k0kubun merged 4 commits intosqldef:masterfrom
yudppp:feature/partial_index_for_psqldef
Oct 3, 2019
Merged

Support Partial Indexes syntax(PostgreSQL) #41
k0kubun merged 4 commits intosqldef:masterfrom
yudppp:feature/partial_index_for_psqldef

Conversation

@yudppp
Copy link
Contributor

@yudppp yudppp commented Oct 1, 2019

Support Partial Indexes syntax.

example

CREATE UNIQUE INDEX index_name on users (name) WHERE age > 20;

https://www.postgresql.org/docs/9.4/indexes-partial.html

return false
}
}
if indexA.where != indexB.where {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This expression is not thorough.
For example, age > 20 and 20 < age deal with different expression.(Should be like same)

Should I support this case?

Copy link
Collaborator

@k0kubun k0kubun Oct 3, 2019

Choose a reason for hiding this comment

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

It'd be nice to have for sure, but I think it's not critical because it's already usable in a normal way (if we don't attempt refactoring, etc.) and we can add the support later when we want.

@yudppp yudppp changed the title Support Partial Indexes(PostgreSQL) Support Partial Indexes syntax(PostgreSQL) Oct 1, 2019
Copy link
Collaborator

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

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

Thank you!

@k0kubun k0kubun merged commit 19d80df into sqldef:master Oct 3, 2019
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.

2 participants