QueryRewriter is a visitor that updates all references of relation named from to to in the
given query, which is the part of create statement of relation.
alter_relation_rename renames a relation to a new name in its Create statement, and returns
the updated definition raw sql. Note that the definition must be a Create statement and the
new_name must be a valid identifier, it should be validated before calling this function. To
update all relations that depend on the renamed one, use alter_relation_rename_refs.
A stored definition can come from an older version, so it may not parse anymore. The error leaves
out the definition and the parser’s message, which quotes it, because the connector options in a
definition can have secrets.