"Yurgis Baykshtis" <ybaykshtis@aurigin.com> writes:
> The problem happens only when running this query from the plpgsql
> function... So it must be a bug specific to plpgsql parser.
It's actually plpgsql trying to be helpful and detect errors.
99% of the time I think this behavior would be considered a feature
rather than a bug --- issuing CREATE RULE from a plpgsql function is
well out past the second standard deviation (even with only one action
in it ;-)), and AFAIK there are no other cases where a semicolon could
be embedded in a SQL construct. So I'm inclined to leave it as-is.
regards, tom lane