The attached code patch (seems to work, but no regression tests or doc
fixes yet) allows plpgsql variable declarations like
declare
x text collate "en_US";
Such a collation spec overrides the default variable collation that is
otherwise inherited from the function's input collation. I believe
this is essentially what we agreed to do a couple weeks ago.
Comments, objections?
regards, tom lane