reductionista commented on a change in pull request #554:
URL: https://github.com/apache/madlib/pull/554#discussion_r587858209



##########
File path: src/ports/postgres/modules/utilities/utilities.py_in
##########
@@ -775,6 +775,17 @@ def is_superuser(user):
     return plpy.execute("SELECT rolsuper FROM pg_catalog.pg_roles "\
                         "WHERE rolname = '{0}'".format(user))[0]['rolsuper']
 
+def get_table_owner(schema_table):
+
+    split_table = schema_table.split(".",1)
+    schema = split_table[0]

Review comment:
       Ok, that makes sense!  I thought I remembered us only prepending madlib 
if they didn't already specify it... must have misremembered.  I'm not worried 
about the case where the admin installs madlib to a schema with a . in it, that 
seems like enough of a bizarre situation we can ignore it.
   
   If we do want this to be a general utility function, then we might want to 
let postgres do the splitting into schema + table name rather than hoping we're 
doing it in exactly the same way it's done internally.  But I don't know off 
the top of my head how to do that (pg_catalog.pg_class?)




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to