Tom Lane wrote:
> These are straw men.
No, these are real problems that exist today.
> We know we have a problem with hard-coded paths
> in old dumps.
This is irrelevant for non-core languages. If I have PL/foo 1.0
installed and upgrade from PostgreSQL 8.0 to 8.1, then I have to
manually recompile PL/foo and install the shared library. So manual
intervention is required in any case and no template system of any kind
will help.
Moreover, the hard-coded paths will not be solved by your proposal. I
don't suppose that in a release or three will start hard coding postgis
parameters to work around hard coded paths in general plug-in modules?
> We know we have a problem with missing validators in
> old dumps
This is irrelevant for non-core languages. If I have PL/foo 1.0
installed and upgrade from PostgreSQL 8.0 to 8.1, the validator in
PL/foo 1.0 will not magically appear or disappear. The information in
the dump is the only accurate information that exists about the
existence of a validator. The information in the template is
completely unrelated to reality. You are assuming that during the
update from PostgreSQL 8.0 to PostgreSQL 8.1 there will also be an
upgrade from PL/foo 1.0 to PL/foo ${latest-at-time-of-8.1-release}, but
there is simply no basis for assuming that.
> And I think that a template is much more likely to
> prevent than introduce the sorts of mis-definition problems you
> suggest
No, the template system introduces misdefinitions that would otherwise
not exist.
> --- all of them can easily happen now from simple user
> errors, whereas with a template it would be right every time.
As you can see above, that is not true.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/