Robert Haas <robertmhaas@gmail.com> writes:
> I kind of wonder if there's some way we could split ProcessUtility()
> up into more digestible pieces. I can't really think of a good way to
> do it though, without writing duplicative switches.
I'm thinking a bit about
ProcessUtility()
{
switch (tag)
{
... cases for BEGIN etc ...
default:
ProcessSlowUtility(...)
}
}
ProcessSlowUtility()
{
event setup code
switch (tag)
{
... cases for everything else ...
default:
elog(ERROR)
}
event teardown code
}
regards, tom lane