-
Notifications
You must be signed in to change notification settings - Fork 91
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
Fixes Bug #63814: Allow for index creation with USING and WHERE keywords... #51
Conversation
…rds supplied as add_index options
Current PostgreSQL version (9.4) allows some other options to be set:
but nobody asked for them for now |
@@ -553,7 +570,10 @@ sub create_index | |||
} | |||
elsif ( $type eq NORMAL ) { | |||
$index_def = | |||
'CREATE INDEX ' . $generator->quote($name) . ' on ' . $generator->quote($table_name) . ' ' . $field_names | |||
'CREATE INDEX ' . $generator->quote($name) . ' on ' . $generator->quote($table_name) . | |||
($index_using ne '' ? ' ' . $index_using : '') . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you include the leading space when setting the value above, you can get rid of the ugly conditionals here.
Not a prerequisite for merging this, but it would be nice to support this in |
It's storing it in the data structure it builds during parsing, but it's not propagating that in the |
@SPodjasek @ilmari This is also likely related to https://rt.cpan.org/Ticket/Display.html?id=101704 and frioux/DBIx-Class-DeploymentHandler#32 (comment) |
@ribasushi No, that's about specifying an explicit conversion when changing column types, it just happens to also use the |
USING & WHERE keywords
My Parser::PostgreSQL changes lack support of function fields in indexes, but it is also an issue with Parser::DBI::PostgreSQL (as stated in line 144 there) |
... supplied as add_index options