Closed smurthys closed 6 years ago
A few tips for making the changes:
doDropOwnedByCurrentUser(query)
where query
is a string that contains the actual query to execute, except it will not have user name. For example, DROP OWNED BY
or drOp OWned bY
. Complete this query by appending the value of CURRENT_USER
and then dynamically execute the completed query.
The names CURRENT_USER and SESSION_USER in DROP OWNED is permitted only from pg9.5. Thus, this pattern of code needs to be guarded and executed as dynamic SQL in pg9.4 and earlier.
The script
testDisallowSchemaDrop.sql
has a few instances that need guarding.