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

How to specify USING with create-index? #530

Closed
evanlouie opened this issue May 23, 2024 · 2 comments
Closed

How to specify USING with create-index? #530

evanlouie opened this issue May 23, 2024 · 2 comments

Comments

@evanlouie
Copy link

I'm trying to write the following postgresql and can't figure out how to specify a GIN index.

create index my_index
    on my_table using gin (properties);
@seancorfield
Copy link
Owner

This was the PR that added :create-index (fairly recently): #517

I don't use PostgreSQL so this isn't a syntax I've ever seen. You're welcome to submit a PR to enhance the work done in #517 with some appropriate way to support the syntax you need (with tests and docs please).

@seancorfield
Copy link
Owner

user=> (sql/format {:create-index [:my_index [:my_table :using-gin :properties]]})
["CREATE INDEX my_index ON my_table USING GIN (properties)"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants