Re: Testing Extension Upgrade Paths - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Testing Extension Upgrade Paths
Date
Msg-id CAB7nPqQicorFJw5s9+Y2LBRHUjQ5fJ=4XWFxq=kO7pUnQnposA@mail.gmail.com
Whole thread Raw
In response to Testing Extension Upgrade Paths  (Jeremy Finzel <finzelj@gmail.com>)
Responses Re: Testing Extension Upgrade Paths
List pgsql-hackers
On Tue, Dec 12, 2017 at 2:55 AM, Jeremy Finzel <finzelj@gmail.com> wrote:
> I understand how to setup a regression suite for a postgres extension, but
> what I'm not clear on from the docs is if there is a pattern that exists for
> testing not only the latest version of an extension, but also an upgraded
> previous version.
>
> Is there any straightforward way to do this that doesn't involve manually
> copying tests?

It is perfectly possible to do tests on a specific version and test
upgrade paths using CREATE EXTENSION and ALTER EXTENSION which support
versioning in a SQL regression script, say:
CREATE EXTENSION foo VERSION "0.1";
-- Do stuff
ALTER EXTENSION foo UPDATE TO "0.2";
-- Do other stuff

> P.S. is this the right list for extension dev questions ???

You are sure to get answers here, most folks on this list have likely
the experience of working on extensions.
-- 
Michael


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: money type's overflow handling is woefully incomplete
Next
From: "Tsunakawa, Takayuki"
Date:
Subject: RE: Added PostgreSQL internals learning materials in Developer FAQ