Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> It is not a bug - it is feature. PLpgSQL statements doesn't expect a
> expression on some places.
Well, it's not unreasonable to expect that a subscripted datum could
be used. It looks to me like this is a grammar omission and the
executor code would work fine.
regards, tom lane