Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files for 4.0.0RC1 version upgrade #71

Merged
merged 4 commits into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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--3.0.sql set_user--2.0--3.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
DATA = set_user--3.0.sql set_user--2.0--3.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 set_user--4.0.0rc1.sql set_user--3.0--4.0.0rc1.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--3.0--4.0.0rc1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* set-user-3.0--4.0.0rc1.sql */

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

-- just bumping our version to 4.0.0rc1. no new SQL features here, so nothing to do.
55 changes: 55 additions & 0 deletions set_user--4.0.0rc1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* set-user--4.0.0rc1.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 */

/* New functions in 3.0 begin here */

CREATE FUNCTION @[email protected]_session_auth(text)
RETURNS text
AS 'MODULE_PATHNAME', 'set_session_auth'
LANGUAGE C STRICT;
REVOKE EXECUTE ON FUNCTION @[email protected]_session_auth(text) FROM PUBLIC;

/* No new sql functions for 4.0.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 = '3.0'
default_version = '4.0.0rc1'
module_pathname = '$libdir/set_user'
relocatable = false