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

[FR] Do you have any thoughts about indices with GiST operators? #17

Open
aschleck opened this issue Sep 10, 2022 · 2 comments
Open

[FR] Do you have any thoughts about indices with GiST operators? #17

aschleck opened this issue Sep 10, 2022 · 2 comments

Comments

@aschleck
Copy link
Contributor

As far as I can tell reshape can generate

CREATE INDEX exciting_index ON boundaries USING gist (epoch, name)

but I am trying to build an index like the following:

CREATE INDEX exciting_index ON boundaries USING gist (epoch, name gist_trgm_ops(siglen=256))

Is this something you would be open to supporting? Or does reshape already support this? I definitely understand if it's too niche. And syntactically I am not sure how it would fit without being gross, this idea makes me feel bad:

[[actions]]
type = "add_index"
table = "boundaries"

	[actions.index]
	name = "exciting_index"
	columns = ["epoch", "name"]
	type = "gist"
        operators = {
            "name" = "gist_trgm_ops(siglen=256)"
        }
@aschleck
Copy link
Contributor Author

aschleck commented Sep 10, 2022

While I am here begging anyway, I might add that I am also considering adding INCLUDE onto that index as well. So like

CREATE INDEX exciting_index
ON boundaries
USING gist (epoch, name gist_trgm_ops(siglen=256))
INCLUDE (area_meters2)

in case you had thoughts about that as well :)

@fabianlindfors
Copy link
Owner

Hi! Sorry about the late reply here :)

These things should absolutely be supported by Reshape, only reason they aren't is that there are so many settings that I didn't have time to add them all.

A bit short on time at the moment but I'll definitely get back and add support for this as soon as possible. If you want to create a PR for it, I'd be happy to review as well. Thanks!

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

No branches or pull requests

2 participants