Re: Extension Templates S03E11 - Mailing list pgsql-hackers

From Dimitri Fontaine
Subject Re: Extension Templates S03E11
Date
Msg-id m2d2lfnu9p.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: Extension Templates S03E11  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Extension Templates S03E11
Re: Extension Templates S03E11
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> On the other hand, I can appreciate the concern that we don't really
> want a dump/restore to include the extension definition when it's
> already on the filesystem.  That said, it amazes me that we don't
> include the version # of the extension in pg_dump's 'CREATE EXTENSION'
> command..  How is that not a problem?

Including the version number would be a problem.

When you install PostgreSQL 9.1, you only have hstore 1.0.
When you install PostgreSQL 9.2, you only have hstore 1.1.
When you install PostgreSQL 9.3, you only have hstore 1.2.
 http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=contrib/hstore/hstore.control;hb=refs/heads/REL9_1_STABLE
http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=contrib/hstore/hstore.control;hb=refs/heads/REL9_2_STABLE
http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=contrib/hstore/hstore.control;hb=refs/heads/REL9_3_STABLE

We should maybe add the extension's version number in our documentation
pages, such as the following:
 http://www.postgresql.org/docs/9.3/interactive/hstore.html

So when you pg_dump | pg_restore from 9.1 into 9.3, if pg_dump were to
be nitpicky about the version of hstore with the command
 CREATE EXTENSION hstore VERSION '1.0';

What would happen is that pg_restore would fail.

That's just the way we maintain contribs.

Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Extension Templates S03E11
Next
From: Stephen Frost
Date:
Subject: Re: Extension Templates S03E11