reductionista commented on a change in pull request #520:
URL: https://github.com/apache/madlib/pull/520#discussion_r504356588
##########
File path: src/ports/postgres/modules/utilities/utilities.py_in
##########
@@ -788,6 +789,10 @@ def current_user():
return plpy.execute("SELECT current_user")[0]['current_user']
# ------------------------------------------------------------------------
+def is_superuser(user):
+
+ return plpy.execute("SELECT rolsuper FROM pg_catalog.pg_roles "\
+ "WHERE rolname = '{0}'".format(user))[0]['rolsuper']
Review comment:
This is great! Glad you found an easy way to verify this.
##########
File path:
src/ports/postgres/modules/deep_learning/madlib_keras_model_selection.py_in
##########
@@ -268,8 +268,12 @@ class MstSearch():
model_selection_table, "_summary")
self.model_id_list = sorted(list(set(model_id_list)))
- if object_table is not None and schema_madlib not in object_table:
- object_table = "{0}.{1}".format(schema_madlib, object_table)
+ if object_table is not None:
+ schema_name = get_schema(object_table)
+ if schema_name is None:
+ object_table = "{0}.{1}".format(schema_madlib,
quote_ident(object_table))
+ elif schema_name != schema_madlib:
+ plpy.error("DL: Custom function table has to be in the {0}
schema".format(schema_madlib))
Review comment:
Looks good
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]