Hannu Krosing <hannu.kros...@2ndquadrant.com> writes: > I started looking at the thread about "Generic type subscripting" and am > wondering, why does it take the approach of modifying pg_type and > modifying lots of internal functions, when instead it could be defined > in a much lighter and less intrusive way as an operator, probably by > reserving a dedicated operator name
It's pretty hard to see how that would extend to allowing extensions to support either array slices ("arr[lo:hi]") or multi-dimensional arrays. Or at least, by the time you get done with allowing those cases, plus assignments to them, it's not so lightweight anymore. You could make the argument that it's okay to blow all those options off and say that extension types only get to define the simplest form of one-subscript subscripting. But this patch has higher ambition than that, and I think that's good. regards, tom lane