On Mon, Dec 2, 2019 at 2:00 PM Robert Haas <robertmh...@gmail.com> wrote: > > ALTER INDEX idx_name DEPENDS ON COLLATION blah VERSION blah; > -- I care about collations and I know which one and which version. > > ALTER INDEX idx_name DEPENDS ON SOME COLLATION; > -- I care about collations but I don't know which one.
This seems a little bit ambiguous. I wouldn't expect this command to trash all recorded versions given how it's spelled. > ALTER INDEX idx_name DEPENDS ON NO COLLATION; > -- I don't care about collations at all. > -- Not sure if we need this. This should be an alias for "trust me all collation are ok"? It's certainly useful for collation library upgrade that don't break indexes, but I'd prefer to spell it something like "CURRENT VERSION". I'll also work on that, but preferably in a later patch as there'll be additional need (process all indexes with a given collation or collation version for instance). While looking at the list of keywords again, I think that "ANY" is a better candidate: ALTER INDEX idx_name DEPENDS ON [ ANY COLLATION | COLLATION blah ] [ UNKNOWN VERSION | VERSION blah ] or ALTER INDEX idx_name ALTER [ ANY COLLATION | COLLATION blah ] DEPENDS ON [ UNKNOWN VERSION | VERSION blah ] I like the 2nd one as it's more obvious that the command will only modify existing dependencies.