Skip to content

Commit

Permalink
Sync extension version with tag version number
Browse files Browse the repository at this point in the history
Previous versions of the set_user extension fell behind the tagged version
number. Bump the extension version and provide an upgrade path to keep the two
in sync.
  • Loading branch information
mpalmi committed Jul 17, 2017
1 parent f78100d commit 7c81d2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MODULES = set_user

EXTENSION = set_user
DATA = set_user--1.1.sql set_user--1.0--1.1.sql
DATA = set_user--1.4.sql set_user--1.1--1.4.sql set_user--1.0--1.1.sql
PGFILEDESC = "set_user - similar to SET ROLE but with added logging"

REGRESS = set_user
Expand Down
6 changes: 6 additions & 0 deletions set_user--1.1--1.4.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* set-user-1.1--1.4.sql */

-- complain if script is sourced in psql, rather than via ALTER EXTENSION
\echo Use "ALTER EXTENSION set_user UPDATE to '1.4'" to load this file. \quit

-- just bumping our version to 1.4. no new features here, so nothing to do.
4 changes: 2 additions & 2 deletions set_user--1.1.sql → set_user--1.4.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* set-user--1.0.sql */
/* set-user--1.4.sql */

-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION set_user" to load this file. \quit
Expand Down Expand Up @@ -29,7 +29,7 @@ LANGUAGE C STRICT;
GRANT EXECUTE ON FUNCTION reset_user() TO PUBLIC;
GRANT EXECUTE ON FUNCTION reset_user(text) TO PUBLIC;

/* New functions in 1.1 begin here */
/* New functions in 1.1 (now 1.4) begin here */

CREATE FUNCTION set_user_u(text)
RETURNS text
Expand Down

0 comments on commit 7c81d2c

Please sign in to comment.