Skip to content

Commit

Permalink
Add files for 3.1 version upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
keithf4 committed Oct 26, 2022
1 parent b6004f5 commit 61e4dde
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
6 changes: 6 additions & 0 deletions set_user--3.0--3.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* set-user-3.0--3.1.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 3.1. no new SQL features here, so nothing to do.
55 changes: 55 additions & 0 deletions set_user--3.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* set-user--3.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 */

/* 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 3.1 */

0 comments on commit 61e4dde

Please sign in to comment.