Jerry Sievers <gsievers19(at)comcast(dot)net> writes:
> Hmmm, I do not see that open is a reserved word but the PL must be
> treating it special somehow.
plpgsql has a different list of reserved words than the main SQL grammar
does. I don't think we explicitly document it anywhere, but pretty much
any keyword that can start a plpgsql command is considered reserved by
plpgsql (since otherwise it'd be ambiguous against an assignment to a
plpgsql variable of the same name).
regards, tom lane