This self-modification of the CreateSchema statement makes my head hurt
... isn't there a cleaner way?
I would really like to see us move towards a processing pipeline in
which parse analysis, rewrite, planning, and execution steps each take
their input data structures as *read only*. I know it's not like that
today, but it needs to be so. If I were to enumerate the bugs we've had
in the past because of violations of that rule, I'd still be composing
this message at dinnertime. (And I still have a very long to-fix list
of kluges, workarounds, and memory leaks that are traceable to the lack
of read-only data structures.) I really really don't want to see any
new work introducing new violations of the rule.
regards, tom lane