Skip to content

Commit

Permalink
Prepare for v2.0.0 release
Browse files Browse the repository at this point in the history
- Get rid of TODO section in README
- Add NOTES section in README for v2.0.0
- Bump default version
- Update upgrade path
  • Loading branch information
mpalmi committed Jun 24, 2020
1 parent 5fb2d3d commit 0ebaad0
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 7 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.6.sql set_user--1.5--1.6.sql set_user--1.4--1.5.sql set_user--1.1--1.4.sql set_user--1.0--1.1.sql
DATA = set_user--2.0.sql set_user--1.6--2.0.sql set_user--1.5--1.6.sql set_user--1.4--1.5.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
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -705,13 +705,16 @@ OR
(0 rows)
```
## TODO
## NOTES
The following changes/enhancements are contemplated:
### Version 2.0.0
* Improve regression tests
* Add ability to create dependencies in `shared_preload_libraries` such that
extension order does not matter.
- Use of GUCs with `whitelist` have been deprecated in lieu of a more
appropriate `allowlist`. The last GUC set by `ALTER SYSTEM` will be used on
reload, the first attempt to `SHOW` a deprecated variable will provide a
NOTICE.
- The extension is now non-relocatable and all functions are schema-qualified.
## Licensing
Expand Down
6 changes: 6 additions & 0 deletions set_user--1.6--2.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* set-user-1.6--2.0.sql */

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

-- just bumping our version to 2.0. no new sql function features here, so nothing to do.
45 changes: 45 additions & 0 deletions set_user--2.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* set-user--2.0.sql */

SET LOCAL search_path to @extschema@;

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

CREATE FUNCTION @[email protected]_user(text)
RETURNS text
AS 'MODULE_PATHNAME', 'set_user'
LANGUAGE C;

CREATE FUNCTION @[email protected]_user(text, text)
RETURNS text
AS 'MODULE_PATHNAME', 'set_user'
LANGUAGE C STRICT;

REVOKE EXECUTE ON FUNCTION @[email protected]_user(text) FROM PUBLIC;
REVOKE EXECUTE ON FUNCTION @[email protected]_user(text, text) FROM PUBLIC;

CREATE FUNCTION @[email protected]_user()
RETURNS text
AS 'MODULE_PATHNAME', 'set_user'
LANGUAGE C;

CREATE FUNCTION @[email protected]_user(text)
RETURNS text
AS 'MODULE_PATHNAME', 'set_user'
LANGUAGE C STRICT;

GRANT EXECUTE ON FUNCTION @[email protected]_user() TO PUBLIC;
GRANT EXECUTE ON FUNCTION @[email protected]_user(text) TO PUBLIC;

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

CREATE FUNCTION @[email protected]_user_u(text)
RETURNS text
AS 'MODULE_PATHNAME', 'set_user'
LANGUAGE C STRICT;

REVOKE EXECUTE ON FUNCTION @[email protected]_user_u(text) FROM PUBLIC;

/* No new sql functions for 1.5 */
/* No new sql functions for 1.6 */
/* No new sql functions for 2.0 */
2 changes: 1 addition & 1 deletion set_user.control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# set_user extension
comment = 'similar to SET ROLE but with added logging'
default_version = '1.6'
default_version = '2.0'
module_pathname = '$libdir/set_user'
relocatable = false

0 comments on commit 0ebaad0

Please sign in to comment.