Re: Upgrading Extension, version numbers (was: Extensions, patch v16)
David Wheeler <david@kineticode.com>
From: "David E. Wheeler" <david@kineticode.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Dimitri Fontaine <dimitri@2ndQuadrant.fr>, Robert Haas <robertmhaas@gmail.com>, Bruce Momjian <bruce@momjian.us>, Oleg Bartunov <oleg@sai.msu.su>, David Fetter <david@fetter.org>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2011-01-03T19:43:43Z
Lists: pgsql-hackers
On Jan 3, 2011, at 11:42 AM, Tom Lane wrote: > It is, but I don't see any alternative. As Dimitri said, the .so will > typically be installed by a packaging system, so we don't have any > opportunity to run SQL code beforehand. In any case ... > >> The new .so should not be installed until the upgrade is been run. > > ... that flat out doesn't work. If the upgrade script tries to add > functions that didn't exist in the old .so, it'll fail. Right, what I'm saying is that `ALTER EXTENSION foo UPGRADE;` should install the .so, too, just before it runs the upgrade scripts. Best, David