I wrote:
> I said a couple of times in recent threads that it wouldn't be too hard
> to implement $SUBJECT given the other patches I've been working on.
Here's a version rebased up to HEAD, with a trivial merge conflict fixed.
This now needs to be applied over the patches in
https://postgr.es/m/833.1516834367@sss.pgh.pa.us
and
https://postgr.es/m/8376.1516835784@sss.pgh.pa.us
regards, tom lane