> > Btw I have working multirange_{send,recv,in,out} now. . . . Just about all the other operators are done too, but I wonder what symbols people like for union and minus? Range uses + for union. I have working code and tests that adds this:
r + mr = mr mr + r = mr mr + mr = mr But I would like to use a different symbol instead, like ++, so I can have all four: r ++ r = mr r ++ mr = mr mr ++ r = mr mr ++ mr = mr (The existing r + r operator throws an error if the inputs have a gap.) The trouble is that ++ isn't allowed. (Neither is --.) From https://www.postgresql.org/docs/11/sql-createoperator.html : > A multicharacter operator name cannot end in + or -, unless the name also > contains at least one of these characters: > ~ ! @ # % ^ & | ` ? So are there any other suggestions? I'm open to arguments that I should just use +, but I think having a way to add two simple ranges and get a multirange would be nice too, so my preference is to find a new operator. It should work with minus and intersection (* for ranges) too. Some proposals: +* and -* and ** (* as in regex "zero or many" reminds me of how a multirange holds zero or many ranges. ** is confusing though because it's like exponentiation.) @+ and @- and @* (I dunno why but I kind of like it. We already have @> and <@.) <+> and <-> and <*> (I was hoping for (+) etc for the math connection to circled operators, but this is close. Maybe this would be stronger if multirange_{in,out} used <> delims instead of {}, although I also like how {} is consistent with arrays.) Anyone else have any thoughts? Thanks, Paul