Closed jasonmp85 closed 9 years ago
As a sanity check, I looked over at cstore, which looks exactly like pg_shard will after this Pull Request.
Testing (not currently automated in any fashion):
v1.0.2
and ran make uninstall; make install
. This places the control and 1.0 SQL file in my PostgreSQL extension areamake uninstall; make install
. This replaces the control file with one defining 1.1
as the default version and adds the 1.1
upgrade (and install) script. This does not remove the 1.0
install script added by the first stepinit.sql
in our tests to first install 1.0 and then upgrade to the latest known versionHere is the SQL for the upgrade:
CREATE EXTENSION pg_shard VERSION '1.0';
ALTER EXTENSION pg_shard UPDATE;
# \dx
# List of installed extensions
# Name | Version | Schema | Description
# ----------+---------+------------+---------------------------------------------------------
# pg_shard | 1.1 | public | extension for sharding across remote PostgreSQL servers
# plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
# (2 rows)
So yeah, the two caveats are:
But this patch works, works with an upgrade from 1.0, and matches what we're doing in cstore.
Adding a new UDF means adding an upgrade script to augment existing installations of pg_shard.
fixes #69