Andrew Dunstan <andrew@dunslane.net> writes:
> I don't think ECPG can use pg_regress as is, because it does more than
> just run psql. We probably need to look at factoring out the common bits
> into a shared lib. That's not a bad idea anyway.
A shared library is probably overkill (it has a lot more installation
overhead than it's worth), but at least factor the source
code so we don't have two copies of the common bits.
It wouldn't be a bad goal to try to use the same "pg_regress 2.0" for
both uses, either. I'm tempted to suggest it should become a separate
subdirectory under src/bin/ to remind people it's decoupled from the
regression tests per se...
regards, tom lane