[med-svn] [Git][med-team/gnumed-server][master] 3 commits: New upstream version 22.34

Marc Angermann (@marc_a) gitlab at salsa.debian.org
Thu Apr 16 21:21:06 BST 2026



Marc Angermann pushed to branch master at Debian Med / gnumed-server


Commits:
63d6de2b by Marc Angermann at 2026-04-16T22:17:34+02:00
New upstream version 22.34
- - - - -
c095d9fb by Marc Angermann at 2026-04-16T22:18:11+02:00
Update upstream source from tag 'upstream/22.34'

Update to upstream version '22.34'
with Debian dir 348db967c02250819ef91dc65d296fadbc0d5ea9
- - - - -
0779bd1c by Marc Angermann at 2026-04-16T22:18:51+02:00
New upstream version 22.34

- - - - -


7 changed files:

- debian/changelog
- server/bootstrap/bootstrap_gm_db_system.py
- server/bootstrap/fixup-db.sh
- server/doc/schema/gnumed-entire_schema.html
- server/sql/v2-v3/superuser/public-gm_transfer_users.sql
- server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
- server/sql/v9-v10/dynamic/v10-gm-role_management-dynamic.sql


Changes:

=====================================
debian/changelog
=====================================
@@ -1,9 +1,13 @@
-gnumed-server (22.33-2) UNRELEASED; urgency=medium
+gnumed-server (22.34-1) unstable; urgency=medium
 
+  [ Andreas Tille ]
   * d/copyright: Remove old FSF address
   * cme fix dpkg-control
 
- -- Andreas Tille <tille at debian.org>  Sun, 01 Mar 2026 21:45:45 +0100
+  [ Marc Angermann ]
+  * New upstream version
+
+ -- Marc Angermann <marc.angermann at gmx.de>  Thu, 16 Apr 2026 22:18:47 +0200
 
 gnumed-server (22.33-1) unstable; urgency=medium
 


=====================================
server/bootstrap/bootstrap_gm_db_system.py
=====================================
@@ -221,24 +221,29 @@ CREATE INDEX %(idx_name)s ON %(idx_schema)s.%(idx_table)s(%(idx_col)s);
 
 #==================================================================
 def user_exists(cursor=None, user=None):
-	SQL = "SELECT usename FROM pg_user WHERE usename = %(usr)s"
-	args = {'usr': user}
+	SQL = "SELECT * FROM pg_roles WHERE rolname = '%s'" % user
+	_log.debug(SQL)
 	try:
-		cursor.execute(SQL, args)
+		cursor.execute(SQL)
 	except:
 		_log.exception(u">>>[%s]<<< failed for user [%s]", SQL, user)
-		return None
+		return False
 
-	res = cursor.fetchone()
-	if cursor.rowcount == 1:
+	rows = cursor.fetchall()
+	_log.debug(rows)
+	if len(rows) == 1:
 		_log.info(u"user [%s] exists", user)
 		return True
 
-	_log.info(u"user [%s] does not exist", user)
-	return None
+	if len(rows) > 1:
+		log.error('more than one user found ??')
+		log.error(rows)
+	else:
+		_log.info(u"user [%s] does not exist", user)
+	return False
 
 #------------------------------------------------------------------
-def db_named_group_role_exists(cursor=None, group=None):
+def group_role_exists(cursor=None, group=None):
 	SQL = 'SELECT groname FROM pg_group WHERE groname = %(grp)s'
 	args = {'grp': group}
 	try:
@@ -256,28 +261,28 @@ def db_named_group_role_exists(cursor=None, group=None):
 	return False
 
 #------------------------------------------------------------------
-def create_db_named_group_role(cursor=None, group=None):
+def create_group_role(cursor=None, group=None, with_admin=False):
 
-	# does this group already exist ?
-	if db_named_group_role_exists(cursor, group):
-		return True
+	_log.debug('ensuring existance of group role [%s], with admin: %s', group, with_admin)
 
-	SQL = 'create group "%s"' % group
-	try:
-		cursor.execute(SQL)
-	except:
-		_log.exception(u">>>[%s]<<< failed for group [%s]", SQL, group)
-		return False
+	if not group_role_exists(cursor, group):
+		SQL = 'create group "%s"' % group
+		try:
+			cursor.execute(SQL)
+		except:
+			_log.exception(u">>>[%s]<<< failed for group [%s]", SQL, group)
+			return False
 
-	SQL = 'GRANT "%s" to "%s" WITH ADMIN OPTION;' % (group, _GM_DBO_ROLE)
-	try:
-		cursor.execute(SQL)
-	except:
-		_log.exception(u">>>[%s]<<< failed for group [%s]", SQL, group)
-		return False
+	if with_admin:
+		SQL = 'GRANT "%s" to "%s" WITH ADMIN OPTION;' % (group, _GM_DBO_ROLE)
+		try:
+			cursor.execute(SQL)
+		except:
+			_log.exception(u">>>[%s]<<< failed for group [%s]", SQL, group)
+			return False
 
 	# paranoia is good
-	if not db_named_group_role_exists(cursor, group):
+	if not group_role_exists(cursor, group):
 		return False
 
 	return True
@@ -494,15 +499,19 @@ class db_server:
 		_log.info(u"bootstrapping database roles")
 
 		# insert standard groups
-		if not self.__create_groups():
+		if not self.__create_groups(with_admin = False):
 			_log.error(u"Cannot create GNUmed standard groups roles.")
 			return None
 
 		# create GNUmed owner
-		if self.__create_dbowner() is None:
+		if not self.__create_dbowner():
 			_log.error(u"Cannot install GNUmed database owner.")
 			return None
 
+		if not self.__create_groups(with_admin = True):
+			_log.error(u"Cannot create GNUmed standard groups roles WITH ADMIN.")
+			return None
+
 #		if not _import_schema(group=self.section, schema_opt='schema', conn=self.conn):
 #			_log.error(u"Cannot import schema definition for server [%s] into database [%s]." % (self.name, self.template_db))
 #			return None
@@ -510,95 +519,98 @@ class db_server:
 		return True
 	#--------------------------------------------------------------
 	def __create_dbowner(self):
-		global _dbowner
+		_log.info('ensuring existance of database owner')
 
+		global _dbowner
 		dbowner_alias = cfg_get("GnuMed defaults", "database owner alias")
 		if dbowner_alias is None:
 			_log.error(u"Cannot load GNUmed database owner name from config file.")
-			return None
+			return False
 
+		_log.debug('db owner alias: %s', dbowner_alias)
 		cursor = self.conn.cursor()
 		# does this user already exist ?
 		if user_exists(cursor, _GM_DBO_ROLE):
-			SQL = (
-				'GRANT "%s" TO "%s";'						# postgres in gm-logins (pg_dump/restore)
-				'GRANT "%s" TO "%s" WITH ADMIN OPTION;'		# gm-dbo in gm-logins; in v17 add: ", INHERIT FALSE, SET FALSE"
-				'GRANT "%s" TO "%s" WITH ADMIN OPTION;'		# gm-dbo in gnumed_vXX; in v17 add: ", INHERIT FALSE, SET FALSE"
-				'ALTER ROLE "%s" CREATEDB CREATEROLE;'
-			) % (
-				_GM_LOGINS_GROUP, _PG_SUPERUSER,
-				_GM_LOGINS_GROUP, _GM_DBO_ROLE,
-				self.db_named_group_role, _GM_DBO_ROLE,
-				_GM_DBO_ROLE
-			)
-			try:
-				cursor.execute(SQL)
-			except:
-				_log.error(u">>>[%s]<<< failed." % SQL)
-				_log.exception("Cannot add GNUmed database owner [%s] to groups [%s] and [%s]." % (_GM_DBO_ROLE, _GM_LOGINS_GROUP, self.db_named_group_role))
-				cursor.close()
-				return False
+			_log.info('db owner role exists, ensuring permissions')
+			SQLs = [
+				# postgres in gm-logins (pg_dump/restore)
+				'GRANT "%s" TO "%s";' % (_GM_LOGINS_GROUP, _PG_SUPERUSER),
+				# alter gm-dbo
+				'ALTER ROLE "%s" CREATEDB CREATEROLE LOGIN;' % _GM_DBO_ROLE,
+				# gm-dbo in gm-logins; in v17 add: ", INHERIT FALSE, SET FALSE"
+				'GRANT "%s" TO "%s" WITH ADMIN OPTION;' % (_GM_LOGINS_GROUP, _GM_DBO_ROLE),
+				# gm-dbo in gnumed_vXX; in v17 add: ", INHERIT FALSE, SET FALSE"
+				'GRANT "%s" TO "%s" WITH ADMIN OPTION;' % (self.db_named_group_role, _GM_DBO_ROLE)
+			]
+			for SQL in SQLs:
+				_log.info('running: %s', SQL)
+				try:
+					cursor.execute(SQL)
+				except:
+					_log.error(u">>>[%s]<<< failed." % SQL)
+					_log.exception("Cannot add GNUmed database owner [%s] to groups [%s] and [%s]." % (_GM_DBO_ROLE, _GM_LOGINS_GROUP, self.db_named_group_role))
+					cursor.close()
+					return False
 
 			self.conn.commit()
 			cursor.close()
 			_dbowner = user(anAlias = dbowner_alias, aPassword = 'should not matter')
+			_log.debug('db owner user class instance: %s', _dbowner)
 			return True
 
+		_log.info('creating new database owner role %s', _GM_DBO_ROLE)
 		print_msg ((
 """The database owner [%s] will be created.
 
 You will have to provide a new password for it
 unless it is pre-defined in the configuration file.
 
-Make sure to remember the password for later use !
+MAKE SURE TO REMEMBER THE PASSWORD FOR LATER USE !
 """) % _GM_DBO_ROLE)
 		_dbowner = user(anAlias = dbowner_alias, force_interactive = True)
 		SQLs = [
-			'CREATE ROLE "%s" WITH ENCRYPTED PASSWORD \'%s\' CREATEDB CREATEROLE;' % (_GM_DBO_ROLE, _dbowner.password),
+			# postgres in gm-logins (pg_dump/restore)
+			'GRANT "%s" TO "%s";' % (_GM_LOGINS_GROUP, _PG_SUPERUSER),
+			# create gm-dbo
+			'CREATE ROLE "%s" WITH ENCRYPTED PASSWORD \'%s\' CREATEDB CREATEROLE LOGIN;' % (_GM_DBO_ROLE, _dbowner.password),
 			# gm-dbo in gm-logins; in v17 add: ", INHERIT FALSE, SET FALSE"
 			'GRANT "%s" TO "%s" WITH ADMIN OPTION;' % (_GM_LOGINS_GROUP, _GM_DBO_ROLE),
 			# gm-dbo in gnumed_vXX; in v17 add: ", INHERIT FALSE, SET FALSE"
 			'GRANT "%s" TO "%s" WITH ADMIN OPTION;'	% (self.db_named_group_role, _GM_DBO_ROLE)
-
 		]
-#		SQL = 'CREATE ROLE "%s" WITH ENCRYPTED PASSWORD \'%s\' CREATEDB CREATEROLE IN GROUP "%s", "gm-logins"' % (_GM_DBO_ROLE, _dbowner.password, self.db_named_group_role)
-		try:
-			for SQL in SQLs:
+		for SQL in SQLs:
+			_log.info('running: %s', SQL)
+			try:
 				cursor.execute(SQL)
-		except:
-			_log.error(">>>[%s]<<< failed.", SQL)
-			_log.exception("Cannot create GNUmed database owner [%s]." % _GM_DBO_ROLE)
-			cursor.close()
-			return None
-
-		# paranoia is good
-		if not user_exists(cursor, _GM_DBO_ROLE):
-			cursor.close()
-			return None
+			except:
+				_log.error(">>>[%s]<<< failed.", SQL)
+				_log.exception("Cannot create GNUmed database owner [%s]." % _GM_DBO_ROLE)
+				cursor.close()
+				return False
 
-		self.conn.commit()
 		cursor.close()
-		return True
+		self.conn.commit()
+		# paranoia is good
+		return user_exists(self.conn.cursor(), _GM_DBO_ROLE)
 
 	#--------------------------------------------------------------
-	def __create_groups(self, aSection = None):
-
+	def __create_groups(self, aSection = None, with_admin = False):
+		_log.debug('creating group roles')
 		if aSection is None:
 			section = "GnuMed defaults"
 		else:
 			section = aSection
-
 		groups = cfg_get(section, "groups")
 		if groups is None:
 			_log.error(u"Cannot load GNUmed group names from config file (section [%s])." % section)
 			groups = [self.db_named_group_role]
 		else:
 			groups.append(self.db_named_group_role)
-
 		cursor = self.conn.cursor()
 		for group in groups:
-			if not create_db_named_group_role(cursor, group):
+			if not create_group_role(cursor, group, with_admin = with_admin):
 				cursor.close()
+				_log.error('problem creating group roles')
 				return False
 
 		self.conn.commit()
@@ -705,7 +717,7 @@ class database:
 		# create authentication group
 		_log.info(u'creating database-specific authentication group role')
 		curs = self.conn.cursor()
-		if not create_db_named_group_role(cursor = curs, group = self.name):
+		if not create_group_role(cursor = curs, group = self.name, with_admin = True):
 			curs.close()
 			_log.error(u'cannot create authentication group role')
 			return False
@@ -714,7 +726,7 @@ class database:
 
 		# paranoia check
 		curs = self.conn.cursor()
-		if not db_named_group_role_exists(cursor = curs, group = self.name):
+		if not group_role_exists(cursor = curs, group = self.name):
 			curs.close()
 			_log.error(u'cannot find authentication group role')
 			return False


=====================================
server/bootstrap/fixup-db.sh
=====================================
@@ -102,7 +102,7 @@ echo_msg "1) Verifying checksums in database (can take a while) ..."
 #	reading any column of a row (unTOASTED columns, that is)
 #	will effect reading the entire row, including OID, but
 #	there's no need to output that value
-pg_dump ${PORT_DEF} --username=gm-dbo --dbname=gnumed_v${VER} --compress=0 --no-sync --format=custom --file=/dev/null &> /dev/null
+pg_dump ${PORT_DEF} --username=gm-dbo --dbname=gnumed_v${VER} --compress=0 --no-sync --format=custom --file=/dev/null
 RETCODE="$?"
 if test "$RETCODE" != "0" ; then
 	echo "Verifying checksums on \"gnumed_v${VER}\" failed (${RETCODE})."


=====================================
server/doc/schema/gnumed-entire_schema.html
=====================================
@@ -112,7 +112,7 @@
 <body>
 
 <!-- Primary Index -->
-<p><br><br>Dumped on 2025-12-29</p>
+<p><br><br>Dumped on 2026-04-16</p>
 <h1><a name="index">Index of database - gnumed_v22</a></h1>
 <ul>
   
@@ -158,7 +158,7 @@
   
   <li><a name="gm.schema">gm</a></li><ul>
     <li><a href="gnumed-entire_schema.html#gm.table.access-log">access_log</a></li><li><a href="gnumed-entire_schema.html#gm.table.notifying-tables">notifying_tables</a></li><li><a href="gnumed-entire_schema.html#gm.table.schema-revision">schema_revision</a></li>
-    <li><a href="gnumed-entire_schema.html#gm.function.account-is-dbowner-or-staff-account-name">account_is_dbowner_or_staff(_account name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.add-missing-array-bits">add_missing_array_bits()</a></li><li><a href="gnumed-entire_schema.html#gm.function.add-table-for-notifies-name-name">add_table_for_notifies(name, name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.add-user-to-permission-group-name-name">add_user_to_permission_group(name, name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.array-unnest-anyarray">array_unnest(anyarray)</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure">concat_table_structure()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-integer">concat_table_structure(integer)</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v1">concat_table_structure_v1()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v16-and-up">concat_table_structure_v16_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v17-and-up">concat_table_structure_v17_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v18-and-up">concat_table_structure_v18_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v19-and-up">concat_table_structure_v19_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v2">concat_table_structure_v2()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v3">concat_table_structure_v3()</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-all-enc-epi-sanity-check-triggers">create_all_enc_epi_sanity_check_triggers()</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-all-table-mod-triggers-drop-old-triggers-boolean">create_all_table_mod_triggers(_drop_old_triggers boolean)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-enc-epi-sanity-check-trigger-schema-name-name-table-name-name-fk-encounter-col-name-fk-episode-col-name">create_enc_epi_sanity_check_trigger(_schema_name name, _table_name name, _fk_encounter_col name, _fk_episode_col name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-generic-combi-vaccine-text-textARRAY-text-boolean">create_generic_combi_vaccine(text, text[], text, boolean)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-table-mod-triggers-schema-name-name-table-name-name">create_table_mod_triggers(_schema_name name, _table_name name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-user-name-text">create_user(name, text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.disable-user-name">disable_user(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.drop-user-name">drop_user(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.get-users">get_users()</a></li><li><a href="gnumed-entire_schema.html#gm.function.get-users-name">get_users(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.is-null-or-blank-string-text">is_null_or_blank_string(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.is-null-or-non-empty-string-text">is_null_or_non_empty_string(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.lo-chunked-md5-oid-integer">lo_chunked_md5(oid, integer)</a></li><li><a href="gnumed-entire_schema.html#gm.function.load-auto-explain-min-duration-integer">load_auto_explain(_min_duration integer)</a></li><li><a href="gnumed-entire_schema.html#gm.function.log-access2emr-text">log_access2emr(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.log-other-access-text">log_other_access(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.log-script-insertion-text-text">log_script_insertion(text, text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.nullify-empty-string-text">nullify_empty_string(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.register-notifying-table-name-name">register_notifying_table(name, name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.strip-allzeros-fraction-numeric">strip_allzeros_fraction(numeric)</a></li><li><a href="gnumed-entire_schema.html#gm.function.transfer-users-text">transfer_users(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.transfer-users-text-text">transfer_users(text, text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.trf-announce-table-del">trf_announce_table_del()</a></li><li><a href="gnumed-entire_schema.html#gm.function.trf-announce-table-ins-upd">trf_announce_table_ins_upd()</a></li><li><a href="gnumed-entire_schema.html#gm.function.user-exists-name">user_exists(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.xid2int-xid">xid2int(xid)</a></li>
+    <li><a href="gnumed-entire_schema.html#gm.function.account-is-dbowner-or-staff-account-name">account_is_dbowner_or_staff(_account name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.add-missing-array-bits">add_missing_array_bits()</a></li><li><a href="gnumed-entire_schema.html#gm.function.add-table-for-notifies-name-name">add_table_for_notifies(name, name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.add-user-to-permission-group-name-name">add_user_to_permission_group(name, name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.array-unnest-anyarray">array_unnest(anyarray)</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure">concat_table_structure()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-integer">concat_table_structure(integer)</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v1">concat_table_structure_v1()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v16-and-up">concat_table_structure_v16_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v17-and-up">concat_table_structure_v17_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v18-and-up">concat_table_structure_v18_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v19-and-up">concat_table_structure_v19_and_up()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v2">concat_table_structure_v2()</a></li><li><a href="gnumed-entire_schema.html#gm.function.concat-table-structure-v3">concat_table_structure_v3()</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-all-enc-epi-sanity-check-triggers">create_all_enc_epi_sanity_check_triggers()</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-all-table-mod-triggers-drop-old-triggers-boolean">create_all_table_mod_triggers(_drop_old_triggers boolean)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-enc-epi-sanity-check-trigger-schema-name-name-table-name-name-fk-encounter-col-name-fk-episode-col-name">create_enc_epi_sanity_check_trigger(_schema_name name, _table_name name, _fk_encounter_col name, _fk_episode_col name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-generic-combi-vaccine-text-textARRAY-text-boolean">create_generic_combi_vaccine(text, text[], text, boolean)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-table-mod-triggers-schema-name-name-table-name-name">create_table_mod_triggers(_schema_name name, _table_name name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.create-user-name-text">create_user(name, text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.disable-user-name">disable_user(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.drop-user-name">drop_user(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.get-users">get_users()</a></li><li><a href="gnumed-entire_schema.html#gm.function.get-users-name">get_users(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.is-null-or-blank-string-text">is_null_or_blank_string(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.is-null-or-non-empty-string-text">is_null_or_non_empty_string(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.lo-chunked-md5-oid-integer">lo_chunked_md5(oid, integer)</a></li><li><a href="gnumed-entire_schema.html#gm.function.load-auto-explain-min-duration-integer">load_auto_explain(_min_duration integer)</a></li><li><a href="gnumed-entire_schema.html#gm.function.log-access2emr-text">log_access2emr(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.log-other-access-text">log_other_access(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.log-script-insertion-text-text">log_script_insertion(text, text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.nullify-empty-string-text">nullify_empty_string(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.register-notifying-table-name-name">register_notifying_table(name, name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.strip-allzeros-fraction-numeric">strip_allzeros_fraction(numeric)</a></li><li><a href="gnumed-entire_schema.html#gm.function.transfer-users-text">transfer_users(text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.transfer-users-text-text">transfer_users(text, text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.trf-announce-table-del">trf_announce_table_del()</a></li><li><a href="gnumed-entire_schema.html#gm.function.trf-announce-table-ins-upd">trf_announce_table_ins_upd()</a></li><li><a href="gnumed-entire_schema.html#gm.function.user-exists-name">user_exists(name)</a></li><li><a href="gnumed-entire_schema.html#gm.function.user-needs-md5-2-scramsha256-pwd-switch-user-text">user_needs_md5_2_scramsha256_pwd_switch(_user text)</a></li><li><a href="gnumed-entire_schema.html#gm.function.xid2int-xid">xid2int(xid)</a></li>
   </ul>
   
   <li><a name="i18n.schema">i18n</a></li><ul>
@@ -50039,11 +50039,11 @@ LEFT JOIN clin.encounter c_enc
 <!-- View Definition -->
 
 <pre>
-SELECT b_b.pk AS pk_bill
+SELECT pk AS pk_bill
 ,
-    b_b.invoice_id
+    invoice_id
 ,
-    b_b.fk_receiver_identity AS pk_receiver_identity
+    fk_receiver_identity AS pk_receiver_identity
 ,
     
 (
@@ -50108,15 +50108,15 @@ SELECT v_bill_items.currency
          LIMIT 1
 ) AS currency
 ,
-    b_b.close_date
+    close_date
 ,
-    b_b.apply_vat
+    apply_vat
 ,
-    b_b.comment
+    comment
 ,
-    b_b.fk_receiver_address AS pk_receiver_address
+    fk_receiver_address AS pk_receiver_address
 ,
-    b_b.fk_doc AS pk_doc
+    fk_doc AS pk_doc
 ,
     
 (
@@ -50153,7 +50153,7 @@ SELECT array_agg
      ) sorted_values
 ) AS pk_bill_items
 ,
-    b_b.xmin AS xmin_bill
+    xmin AS xmin_bill
    
 FROM bill.bill b_b;</pre>
 
@@ -53333,12 +53333,12 @@ ON (
 <!-- View Definition -->
 
 <pre>
-SELECT dt.pk AS pk_doc_type
+SELECT pk AS pk_doc_type
 ,
-    dt.name AS type
+    name AS type
 ,
     _
-(dt.name) AS l10n_type
+(name) AS l10n_type
 ,
     
 (NOT 
@@ -53364,7 +53364,7 @@ SELECT dt.pk AS pk_doc_type
      )
 ) AS is_in_use
 ,
-    dt.xmin AS xmin_doc_type
+    xmin AS xmin_doc_type
    
 FROM blobs.doc_type dt;</pre>
 
@@ -55324,14 +55324,14 @@ WHERE (d_n.active IS TRUE);</pre>
 <!-- View Definition -->
 
 <pre>
-SELECT b_vud.pk_patient
+SELECT pk_patient
 ,
     count
 (1) AS no_of_docs
    
 FROM blobs.v_unreviewed_docs b_vud
   
-GROUP BY b_vud.pk_patient;</pre>
+GROUP BY pk_patient;</pre>
 
 
 <!-- List off permissions -->
@@ -58820,55 +58820,55 @@ end;</pre>
 <!-- View Definition -->
 
 <pre>
-SELECT v_emr_journal.pk_patient
+SELECT pk_patient
 ,
-    v_emr_journal.modified_when
+    modified_when
 ,
-    v_emr_journal.clin_when
+    clin_when
 ,
-    v_emr_journal.modified_by
+    modified_by
 ,
-    v_emr_journal.soap_cat
+    soap_cat
 ,
-    v_emr_journal.narrative
+    narrative
 ,
-    v_emr_journal.pk_encounter
+    pk_encounter
 ,
-    v_emr_journal.pk_episode
+    pk_episode
 ,
-    v_emr_journal.pk_health_issue
+    pk_health_issue
 ,
-    v_emr_journal.src_pk
+    src_pk
 ,
-    v_emr_journal.src_table
+    src_table
 ,
-    v_emr_journal.row_version
+    row_version
 ,
-    v_emr_journal.health_issue
+    health_issue
 ,
-    v_emr_journal.issue_laterality
+    issue_laterality
 ,
-    v_emr_journal.issue_active
+    issue_active
 ,
-    v_emr_journal.issue_clinically_relevant
+    issue_clinically_relevant
 ,
-    v_emr_journal.issue_confidential
+    issue_confidential
 ,
-    v_emr_journal.episode
+    episode
 ,
-    v_emr_journal.episode_open
+    episode_open
 ,
-    v_emr_journal.encounter_started
+    encounter_started
 ,
-    v_emr_journal.encounter_last_affirmed
+    encounter_last_affirmed
 ,
-    v_emr_journal.encounter_type
+    encounter_type
 ,
-    v_emr_journal.encounter_l10n_type
+    encounter_l10n_type
    
 FROM clin.v_emr_journal
   
-WHERE (v_emr_journal.src_table <> 'clin.suppressed_hint'::text);</pre>
+WHERE (src_table <> 'clin.suppressed_hint'::text);</pre>
 
 
 <!-- List off permissions -->
@@ -74435,11 +74435,11 @@ WHERE (
 <!-- View Definition -->
 
 <pre>
-SELECT c_p.fk_identity AS pk_patient
+SELECT fk_identity AS pk_patient
 ,
-    c_p.modified_when
+    modified_when
 ,
-    c_p.modified_when AS clin_when
+    modified_when AS clin_when
 ,
     COALESCE
 (
@@ -74452,7 +74452,7 @@ SELECT c_p.fk_identity AS pk_patient
      )
      , (
            ('<'::text || 
-                 (c_p.modified_by)::text
+                 (modified_by)::text
            ) || '>'::text
      )
 ) AS modified_by
@@ -74463,7 +74463,7 @@ SELECT c_p.fk_identity AS pk_patient
 (_
      ('EDC'::text) || to_char
      (
-           (c_p.edc)::timestamp with time zone
+           (edc)::timestamp with time zone
            ,': YYYY Mon DD'::text
      )
 ) AS narrative
@@ -74484,11 +74484,11 @@ ORDER BY c_e.started DESC
 ,
     NULL::integer AS pk_health_issue
 ,
-    c_p.pk AS src_pk
+    pk AS src_pk
 ,
     'clin.patient'::text AS src_table
 ,
-    c_p.row_version
+    row_version
 ,
     NULL::text AS health_issue
 ,
@@ -74514,7 +74514,7 @@ ORDER BY c_e.started DESC
    
 FROM clin.patient c_p
   
-WHERE (c_p.edc IS NOT NULL);</pre>
+WHERE (edc IS NOT NULL);</pre>
 
 
 <!-- List off permissions -->
@@ -78800,35 +78800,35 @@ SELECT encounter.fk_patient
  WHERE (encounter.pk = c_hi.fk_encounter)
 ) AS pk_patient
 ,
-    c_hi.pk AS pk_health_issue
+    pk AS pk_health_issue
 ,
-    c_hi.description
+    description
 ,
-    c_hi.summary
+    summary
 ,
-    c_hi.laterality
+    laterality
 ,
-    c_hi.age_noted
+    age_noted
 ,
-    c_hi.is_active
+    is_active
 ,
-    c_hi.clinically_relevant
+    clinically_relevant
 ,
-    c_hi.is_confidential
+    is_confidential
 ,
-    c_hi.is_cause_of_death
+    is_cause_of_death
 ,
-    c_hi.fk_encounter AS pk_encounter
+    fk_encounter AS pk_encounter
 ,
-    c_hi.modified_when
+    modified_when
 ,
-    c_hi.modified_by
+    modified_by
 ,
-    c_hi.row_version
+    row_version
 ,
-    c_hi."grouping"
+    "grouping"
 ,
-    c_hi.diagnostic_certainty_classification
+    diagnostic_certainty_classification
 ,
     
 (EXISTS 
@@ -78858,7 +78858,7 @@ SELECT encounter.fk_patient
      , ARRAY[]::integer[]
 ) AS pk_generic_codes
 ,
-    c_hi.xmin AS xmin_health_issue
+    xmin AS xmin_health_issue
    
 FROM clin.health_issue c_hi;</pre>
 
@@ -83394,43 +83394,43 @@ WHERE (
 <!-- View Definition -->
 
 <pre>
-SELECT c_idu.pk AS pk_incoming_data_unmatched
+SELECT pk AS pk_incoming_data_unmatched
 ,
-    c_idu.fk_patient_candidates AS pk_patient_candidates
+    fk_patient_candidates AS pk_patient_candidates
 ,
-    c_idu.firstnames
+    firstnames
 ,
-    c_idu.lastnames
+    lastnames
 ,
-    c_idu.dob
+    dob
 ,
-    c_idu.gender
+    gender
 ,
-    c_idu.postcode
+    postcode
 ,
-    c_idu.other_info
+    other_info
 ,
-    c_idu.request_id
+    request_id
 ,
-    c_idu.requestor
+    requestor
 ,
-    c_idu.external_data_id
+    external_data_id
 ,
-    c_idu.comment
+    comment
 ,
-    c_idu.fk_identity_disambiguated AS pk_identity_disambiguated
+    fk_identity_disambiguated AS pk_identity_disambiguated
 ,
-    c_idu.fk_provider_disambiguated AS pk_provider_disambiguated
+    fk_provider_disambiguated AS pk_provider_disambiguated
 ,
-    c_idu.type AS data_type
+    type AS data_type
 ,
     md5
-(c_idu.data) AS md5_sum
+(data) AS md5_sum
 ,
     octet_length
-(c_idu.data) AS data_size
+(data) AS data_size
 ,
-    c_idu.xmin AS xmin_incoming_data_unmatched
+    xmin AS xmin_incoming_data_unmatched
    
 FROM clin.incoming_data_unmatched c_idu;</pre>
 
@@ -85790,7 +85790,7 @@ SELECT encounter.fk_patient
  WHERE (encounter.pk = a.fk_encounter)
 ) AS pk_patient
 ,
-    a.modified_when
+    modified_when
 ,
     COALESCE
 (
@@ -85803,22 +85803,22 @@ SELECT encounter.fk_patient
      )
      , (
            ('<'::text || 
-                 (a.modified_by)::text
+                 (modified_by)::text
            ) || '>'::text
      )
 ) AS modified_by
 ,
-    a.last_confirmed
+    last_confirmed
 ,
-    a.has_allergy
+    has_allergy
 ,
-    a.comment
+    comment
 ,
-    a.fk_encounter AS pk_encounter
+    fk_encounter AS pk_encounter
 ,
-    a.pk AS pk_allergy_state
+    pk AS pk_allergy_state
 ,
-    a.xmin AS xmin_allergy_state
+    xmin AS xmin_allergy_state
    
 FROM clin.allergy_state a;</pre>
 
@@ -96342,11 +96342,11 @@ SELECT pg_class.relname
  WHERE (pg_class.oid = rr.tableoid)
 ) AS src_table
 ,
-    rr.fk_reviewed_row AS pk_reviewed_row
+    fk_reviewed_row AS pk_reviewed_row
 ,
-    rr.is_technically_abnormal
+    is_technically_abnormal
 ,
-    rr.clinically_relevant
+    clinically_relevant
 ,
     
 (
@@ -96357,11 +96357,11 @@ SELECT staff.short_alias
  WHERE (staff.pk = rr.fk_reviewer)
 ) AS reviewer
 ,
-    rr.comment
+    comment
 ,
-    rr.pk AS pk_review_root
+    pk AS pk_review_root
 ,
-    rr.fk_reviewer AS pk_reviewer
+    fk_reviewer AS pk_reviewer
    
 FROM clin.review_root rr;</pre>
 
@@ -99972,15 +99972,15 @@ LEFT JOIN dem.org d_o
 <!-- View Definition -->
 
 <pre>
-SELECT c_tp.pk AS pk_test_panel
+SELECT pk AS pk_test_panel
 ,
-    c_tp.description
+    description
 ,
-    c_tp.comment
+    comment
 ,
-    c_tp.modified_when
+    modified_when
 ,
-    c_tp.modified_by
+    modified_by
 ,
     COALESCE
 (
@@ -100032,9 +100032,9 @@ SELECT row_to_json
      , ARRAY[]::integer[]
 ) AS pk_generic_codes
 ,
-    c_tp.row_version
+    row_version
 ,
-    c_tp.xmin AS xmin_test_panel
+    xmin AS xmin_test_panel
    
 FROM clin.test_panel c_tp;</pre>
 
@@ -113307,11 +113307,11 @@ not-quite-so-bad: occupation
 <!-- View Definition -->
 
 <pre>
-SELECT lnk_person_org_address.id_identity
+SELECT id_identity
 ,
-    lnk_person_org_address.id_address
+    id_address
 ,
-    lnk_person_org_address.id_type
+    id_type
    
 FROM dem.lnk_person_org_address;</pre>
 
@@ -117546,53 +117546,53 @@ FROM dem.lnk_person_org_address;</pre>
 <!-- View Definition -->
 
 <pre>
-SELECT d_vp.pk_identity
+SELECT pk_identity
 ,
-    d_vp.title
+    title
 ,
-    d_vp.firstnames
+    firstnames
 ,
-    d_vp.preferred
+    preferred
 ,
-    d_vp.lastnames
+    lastnames
 ,
-    d_vp.gender
+    gender
 ,
-    d_vp.l10n_gender
+    l10n_gender
 ,
-    d_vp.dob_only
+    dob_only
 ,
-    d_vp.dob
+    dob
 ,
-    d_vp.tob
+    tob
 ,
-    d_vp.deceased
+    deceased
 ,
-    d_vp.marital_status
+    marital_status
 ,
-    d_vp.l10n_marital_status
+    l10n_marital_status
 ,
-    d_vp.emergency_contact
+    emergency_contact
 ,
-    d_vp.comment
+    comment
 ,
-    d_vp.is_deleted
+    is_deleted
 ,
-    d_vp.pk_marital_status
+    pk_marital_status
 ,
-    d_vp.pk_active_name
+    pk_active_name
 ,
-    d_vp.pk_emergency_contact
+    pk_emergency_contact
 ,
-    d_vp.pk_primary_provider
+    pk_primary_provider
 ,
-    d_vp.xmin_identity
+    xmin_identity
 ,
-    d_vp.dob_is_estimated
+    dob_is_estimated
    
 FROM dem.v_all_persons d_vp
   
-WHERE (d_vp.is_deleted IS FALSE);</pre>
+WHERE (is_deleted IS FALSE);</pre>
 
 
 <!-- List off permissions -->
@@ -119351,53 +119351,53 @@ WHERE (
 <!-- View Definition -->
 
 <pre>
-SELECT d_vp.pk_identity
+SELECT pk_identity
 ,
-    d_vp.title
+    title
 ,
-    d_vp.firstnames
+    firstnames
 ,
-    d_vp.preferred
+    preferred
 ,
-    d_vp.lastnames
+    lastnames
 ,
-    d_vp.gender
+    gender
 ,
-    d_vp.l10n_gender
+    l10n_gender
 ,
-    d_vp.dob_only
+    dob_only
 ,
-    d_vp.dob
+    dob
 ,
-    d_vp.tob
+    tob
 ,
-    d_vp.deceased
+    deceased
 ,
-    d_vp.marital_status
+    marital_status
 ,
-    d_vp.l10n_marital_status
+    l10n_marital_status
 ,
-    d_vp.emergency_contact
+    emergency_contact
 ,
-    d_vp.comment
+    comment
 ,
-    d_vp.is_deleted
+    is_deleted
 ,
-    d_vp.pk_marital_status
+    pk_marital_status
 ,
-    d_vp.pk_active_name
+    pk_active_name
 ,
-    d_vp.pk_emergency_contact
+    pk_emergency_contact
 ,
-    d_vp.pk_primary_provider
+    pk_primary_provider
 ,
-    d_vp.xmin_identity
+    xmin_identity
 ,
-    d_vp.dob_is_estimated
+    dob_is_estimated
    
 FROM dem.v_all_persons d_vp
   
-WHERE (d_vp.is_deleted IS TRUE);</pre>
+WHERE (is_deleted IS TRUE);</pre>
 
 
 <!-- List off permissions -->
@@ -119933,21 +119933,21 @@ FROM (dem.lnk_org_unit2ext_id d_lou2ei
 <!-- View Definition -->
 
 <pre>
-SELECT gl.tag
+SELECT tag
 ,
     _
-(gl.tag) AS l10n_tag
+(tag) AS l10n_tag
 ,
-    gl.label
+    label
 ,
     _
-(gl.label) AS l10n_label
+(label) AS l10n_label
 ,
-    gl.comment
+    comment
 ,
-    gl.sort_weight
+    sort_weight
 ,
-    gl.pk AS pk_gender_label
+    pk AS pk_gender_label
    
 FROM dem.gender_label gl;</pre>
 
@@ -130160,6 +130160,26 @@ BEGIN
 	return true;
 END;</pre>
 
+<hr>
+<h2>Function:
+  <a href="gnumed-entire_schema.html#gm.schema">gm</a>.<a name="gm.function.user-needs-md5-2-scramsha256-pwd-switch-user-text">user_needs_md5_2_scramsha256_pwd_switch(_user text)</a>
+</h2>
+<h3>Returns: boolean</h3>
+<h3>Language: PLPGSQL</h3>
+<p>Check if a given user needs to renew the password for making the encryption method switch.</p>
+<pre>
+BEGIN
+	PERFORM 1 FROM pg_authid WHERE
+		rolname = _user
+			AND
+		rolpassword LIKE 'md5%';
+	IF NOT FOUND THEN
+		RETURN FALSE;
+	END IF;
+	RAISE NOTICE 'gm.user_needs_md5_2_scramsha256_pwd_switch: account [%] needs to re-set password for encryption method switch', _user;
+	RETURN TRUE;
+END;</pre>
+
 <hr>
 <h2>Function:
   <a href="gnumed-entire_schema.html#gm.schema">gm</a>.<a name="gm.function.xid2int-xid">xid2int(xid)</a>
@@ -140782,27 +140802,27 @@ FROM (ref.atc a
 <!-- View Definition -->
 
 <pre>
-SELECT auto_hint.pk AS pk_auto_hint
+SELECT pk AS pk_auto_hint
 ,
-    auto_hint.query
+    query
 ,
-    auto_hint.recommendation_query
+    recommendation_query
 ,
-    auto_hint.title
+    title
 ,
-    auto_hint.hint
+    hint
 ,
-    auto_hint.url
+    url
 ,
-    auto_hint.is_active
+    is_active
 ,
-    auto_hint.source
+    source
 ,
-    auto_hint.lang
+    lang
 ,
-    auto_hint.popup_type
+    popup_type
 ,
-    auto_hint.highlight_as_priority
+    highlight_as_priority
 ,
     NULL::text AS rationale4suppression
 ,
@@ -140814,28 +140834,28 @@ SELECT auto_hint.pk AS pk_auto_hint
            (
                  (
                        (COALESCE
-                             (auto_hint.query
+                             (query
                                    ,''::text
                              ) || COALESCE
-                             (auto_hint.recommendation_query
+                             (recommendation_query
                                    ,''::text
                              )
                        ) || COALESCE
-                       (auto_hint.title
+                       (title
                              ,''::text
                        )
                  ) || COALESCE
-                 (auto_hint.hint
+                 (hint
                        ,''::text
                  )
            ) || COALESCE
-           (auto_hint.url
+           (url
                  ,''::text
            )
      )
 ) AS md5_sum
 ,
-    auto_hint.xmin AS xmin_auto_hint
+    xmin AS xmin_auto_hint
    
 FROM ref.auto_hint;</pre>
 
@@ -142155,22 +142175,22 @@ FROM (
 <!-- View Definition -->
 
 <pre>
-SELECT r_dp.pk AS pk_drug_product
+SELECT pk AS pk_drug_product
 ,
-    r_dp.description AS product
+    description AS product
 ,
-    r_dp.preparation
+    preparation
 ,
     _
-(r_dp.preparation) AS l10n_preparation
+(preparation) AS l10n_preparation
 ,
-    r_dp.atc_code AS atc
+    atc_code AS atc
 ,
-    r_dp.external_code
+    external_code
 ,
-    r_dp.external_code_type
+    external_code_type
 ,
-    r_dp.is_fake AS is_fake_product
+    is_fake AS is_fake_product
 ,
     
 (EXISTS 
@@ -142221,9 +142241,9 @@ SELECT row_to_json
      ) component_row
 ) AS components
 ,
-    r_dp.fk_data_source AS pk_data_source
+    fk_data_source AS pk_data_source
 ,
-    r_dp.xmin AS xmin_drug_product
+    xmin AS xmin_drug_product
    
 FROM ref.drug_product r_dp;</pre>
 
@@ -143979,31 +143999,31 @@ FROM (
 <!-- View Definition -->
 
 <pre>
-SELECT r_ke.pk AS pk_expansion
+SELECT pk AS pk_expansion
 ,
-    r_ke.fk_staff AS pk_staff
+    fk_staff AS pk_staff
 ,
-    r_ke.keyword
+    keyword
 ,
-    r_ke.textual_data AS expansion
+    textual_data AS expansion
 ,
-    r_ke.encrypted AS is_encrypted
+    encrypted AS is_encrypted
 ,
     
-(r_ke.binary_data IS NULL) AS is_textual
+(binary_data IS NULL) AS is_textual
 ,
     octet_length
-(r_ke.binary_data) AS data_size
+(binary_data) AS data_size
 ,
     
-(r_ke.fk_staff IS NULL) AS public_expansion
+(fk_staff IS NULL) AS public_expansion
 ,
     
-(r_ke.fk_staff IS NOT NULL) AS private_expansion
+(fk_staff IS NOT NULL) AS private_expansion
 ,
-    r_ke.owner
+    owner
 ,
-    r_ke.xmin AS xmin_expansion
+    xmin AS xmin_expansion
    
 FROM ref.keyword_expansion r_ke;</pre>
 
@@ -144563,15 +144583,15 @@ FROM (ref.substance r_s
 <!-- View Definition -->
 
 <pre>
-SELECT r_pt.pk AS pk_paperwork_template
+SELECT pk AS pk_paperwork_template
 ,
-    r_pt.name_short
+    name_short
 ,
-    r_pt.name_long
+    name_long
 ,
-    r_pt.external_version
+    external_version
 ,
-    r_pt.gnumed_revision
+    gnumed_revision
 ,
     
 (
@@ -144593,7 +144613,7 @@ SELECT _
 ) AS l10n_template_type
 ,
     COALESCE
-(r_pt.instance_type
+(instance_type
      , (
       SELECT r_ft.name
            
@@ -144605,7 +144625,7 @@ SELECT _
 ,
     COALESCE
 (_
-     (r_pt.instance_type)
+     (instance_type)
      , (
       SELECT _
            (r_ft.name) AS _
@@ -144616,21 +144636,21 @@ SELECT _
      )
 ) AS l10n_instance_type
 ,
-    r_pt.engine
+    engine
 ,
-    r_pt.in_use
+    in_use
 ,
-    r_pt.edit_after_substitution
+    edit_after_substitution
 ,
-    r_pt.filename
+    filename
 ,
         CASE
             WHEN 
-(r_pt.data IS NOT NULL) THEN true
+(data IS NOT NULL) THEN true
             ELSE false
         END AS has_template_data
 ,
-    r_pt.modified_when AS last_modified
+    modified_when AS last_modified
 ,
     COALESCE
 (
@@ -144643,14 +144663,14 @@ SELECT _
      )
      , (
            ('<'::text || 
-                 (r_pt.modified_by)::text
+                 (modified_by)::text
            ) || '>'::text
      )
 ) AS modified_by
 ,
-    r_pt.fk_template_type AS pk_template_type
+    fk_template_type AS pk_template_type
 ,
-    r_pt.xmin AS xmin_paperwork_template
+    xmin AS xmin_paperwork_template
    
 FROM ref.paperwork_templates r_pt;</pre>
 
@@ -145044,13 +145064,13 @@ FROM (ref.dose r_d
 <!-- View Definition -->
 
 <pre>
-SELECT r_s.pk AS pk_substance
+SELECT pk AS pk_substance
 ,
-    r_s.description AS substance
+    description AS substance
 ,
-    r_s.intake_instructions
+    intake_instructions
 ,
-    r_s.atc
+    atc
 ,
     ARRAY
 (
@@ -145076,7 +145096,7 @@ SELECT row_to_json
      ) loinc_row
 ) AS loincs
 ,
-    r_s.xmin AS xmin_substance
+    xmin AS xmin_substance
    
 FROM ref.substance r_s;</pre>
 
@@ -145244,18 +145264,18 @@ FROM ref.substance r_s;</pre>
 <!-- View Definition -->
 
 <pre>
-SELECT rti.pk AS pk_tag_image
+SELECT pk AS pk_tag_image
 ,
-    rti.description
+    description
 ,
     _
-(rti.description) AS l10n_description
+(description) AS l10n_description
 ,
-    rti.filename
+    filename
 ,
     octet_length
 (COALESCE
-     (rti.image
+     (image
            ,'\x'::bytea
      )
 ) AS size
@@ -145272,7 +145292,7 @@ SELECT rti.pk AS pk_tag_image
      )
 ) AS is_in_use
 ,
-    rti.xmin AS xmin_tag_image
+    xmin AS xmin_tag_image
    
 FROM ref.tag_image rti;</pre>
 
@@ -145986,27 +146006,27 @@ public expansion of the same keyword.</p>
 
 <pre>
 SELECT DISTINCT 
-ON (union_result.keyword) union_result.pk_expansion
+ON (keyword) pk_expansion
 ,
-    union_result.pk_staff
+    pk_staff
 ,
-    union_result.keyword
+    keyword
 ,
-    union_result.expansion
+    expansion
 ,
-    union_result.is_encrypted
+    is_encrypted
 ,
-    union_result.is_textual
+    is_textual
 ,
-    union_result.data_size
+    data_size
 ,
-    union_result.public_expansion
+    public_expansion
 ,
-    union_result.private_expansion
+    private_expansion
 ,
-    union_result.owner
+    owner
 ,
-    union_result.xmin_expansion
+    xmin_expansion
    
 FROM (
 SELECT r_ke.pk AS pk_expansion


=====================================
server/sql/v2-v3/superuser/public-gm_transfer_users.sql
=====================================
@@ -48,7 +48,8 @@ BEGIN
 	select into member_ids grolist from pg_group where groname = _source_group;
 	FOR idx IN coalesce(array_lower(member_ids, 1), 0) .. coalesce(array_upper(member_ids, 1), -1) LOOP
 		member_id := member_ids[idx];
-		select into member_name usename from pg_user where usesysid = member_id;
+		--select into member_name usename from pg_user where usesysid = member_id;
+		select into member_name rolname from pg_roles where oid = member_id;
 		tmp := ''gm_transfer_users(text): transferring "''
 				|| member_name || ''" (''
 				|| member_id || '') from group "''


=====================================
server/sql/v21-v22/fixups/v22-release_notes-fixup.sql
=====================================
@@ -17,20 +17,23 @@ INSERT INTO dem.message_inbox (
 ) VALUES (
 	(select pk from dem.staff where db_user = 'any-doc'),
 	(select pk_type from dem.v_inbox_item_type where type = 'memo' and category = 'administrative'),
-	'Release Notes for GNUmed 1.8.23 (database v22.33)',
-	'GNUmed 1.8.23 Release Notes:
+	'Release Notes for GNUmed 1.8.24 (database v22.34)',
+	'GNUmed 1.8.24 Release Notes:
 
-	1.8.23
+	1.8.24
 
-FIX: hyphenated module names failing in newer Python versions [thanks María]
+FIX: more robust UI update when quickly scrolling document tree
+FIX: more robust handling of DICOM instance download issues
+FIX: more robust Orthanc DICOM instance parsing
 
-IMPROVED: UI: cfg: notebook tabs position [thanks María]
-IMPROVED: DB: warn on non-SCRAM passwords
+	22.34
 
-	22.33
-
-FIX: boostrapping: gm-dbo cannot GRANT ...  WITH ADMIN to itself
+FIX: bootstrapping: chicken-egg-problem with gm-dbo vs groups creation
+FIX: bootstrapping: use pg_roles rather than pg_user b/c of collation dependance
+FIX: gm.transfer_users(): switch from pg_user to pg_roles
+FIX: bootstrapping: properly set ADMIN on groups when running several upgrades in a row
+FIX: bootstrapping: using CREATE ROLE for users requires explicit LOGIN
 ');
 
 -- --------------------------------------------------------------
-select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.33 at 1.8.23');
+select gm.log_script_insertion('v22-release_notes-fixup.sql', '22.34 at 1.8.24');


=====================================
server/sql/v9-v10/dynamic/v10-gm-role_management-dynamic.sql
=====================================
@@ -45,7 +45,8 @@ BEGIN
 	select into member_ids grolist from pg_group where groname = _source_group;
 	FOR idx IN coalesce(array_lower(member_ids, 1), 0) .. coalesce(array_upper(member_ids, 1), -1) LOOP
 		member_id := member_ids[idx];
-		select into member_name usename from pg_user where usesysid = member_id;
+		--select into member_name usename from pg_user where usesysid = member_id;
+		select into member_name rolname from pg_roles where oid = member_id;
 		tmp := ''gm_transfer_users(text): transferring "''
 				|| member_name || ''" (''
 				|| member_id || '') from group "''



View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/compare/bdb3a46d171727aacc2ddbac69623c0755871001...0779bd1c6db2c44578a9afdfb17effe0601ec1dc

-- 
View it on GitLab: https://salsa.debian.org/med-team/gnumed-server/-/compare/bdb3a46d171727aacc2ddbac69623c0755871001...0779bd1c6db2c44578a9afdfb17effe0601ec1dc
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260416/47e06d37/attachment-0001.htm>


More information about the debian-med-commit mailing list