Re: BUG #13581: pg_dump omits extension versions - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #13581: pg_dump omits extension versions
Date
Msg-id 17233.1440078701@sss.pgh.pa.us
Whole thread Raw
In response to BUG #13581: pg_dump omits extension versions  (nickbarnes01@gmail.com)
Responses Re: BUG #13581: pg_dump omits extension versions  (Nick Barnes <nickbarnes01@gmail.com>)
List pgsql-bugs
nickbarnes01@gmail.com writes:
> pg_dump does not include a VERSION clause in CREATE EXTENSION
> statements.

That is by design.  pg_dump does not try to force you to reload the
data into the same server version either.  The expectation is that
you may want to load the data into a newer server version, and the
same would go for extensions.

> This can cause the restore to fail, if for example the structure of the
> extension's configuration tables has changed, or the database has
> dependencies on a dropped function, type, etc.

If some extension has broken compatibility with its own previous versions
that badly, I would say you have a gripe to file with the extension's
author, not us.

In any particular case you could presumably work around it by temporarily
changing the extension's default version in the new installation.  But
even then, how could ALTER EXTENSION UPDATE work, if there are such
incompatibilities between its older and newer versions?

The core server code goes to very great lengths to ensure that pg_dump
scripts from older server versions will load into newer ones.  I do not
see why we should expect differently from extension authors.

            regards, tom lane

pgsql-bugs by date:

Previous
From: martipamies@gmail.com
Date:
Subject: BUG #13580: Fix namespace handling in xpath function, current functions collision
Next
From: Tom Lane
Date:
Subject: Re: BUG #13580: Fix namespace handling in xpath function, current functions collision