Alon Bar-Lev has uploaded a new change for review. Change subject: db: cleanup: remove unused fn_db_set_dbobjects_ownership ......................................................................
db: cleanup: remove unused fn_db_set_dbobjects_ownership Change-Id: I0a87b65a237527a84ff2a9382781e5f48923008e Signed-off-by: Alon Bar-Lev <[email protected]> --- M packaging/dbscripts/dbcustomfunctions.sh 1 file changed, 0 insertions(+), 23 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/25213/1 diff --git a/packaging/dbscripts/dbcustomfunctions.sh b/packaging/dbscripts/dbcustomfunctions.sh index c05c783..5c89c74 100755 --- a/packaging/dbscripts/dbcustomfunctions.sh +++ b/packaging/dbscripts/dbcustomfunctions.sh @@ -44,29 +44,6 @@ execute_file "create_dwh_views.sql" ${DATABASE} ${SERVERNAME} ${PORT} > /dev/null } -fn_db_set_dbobjects_ownership() { - cmd="select c.relname \ - from pg_class c join pg_roles r on r.oid = c.relowner join pg_namespace n on n.oid = c.relnamespace \ - where c.relkind in ('r','v','S') \ - and n.nspname = 'public' and r.rolname != '${DBOBJECT_OWNER}';" - res=$(execute_command "${cmd}" engine ${SERVERNAME} ${PORT}) - if [ -n "${res}" ]; then - cmd="" - for tab in $(echo $res); do - cmd=${cmd}"alter table $tab owner to ${DBOBJECT_OWNER}; " - done - if [ -n "${cmd}" ]; then - echo -n "Changing ownership of objects in database '$DATABASE' to owner '$DBOBJECT_OWNER' ... " - res=$(execute_command "${cmd}" engine ${SERVERNAME} ${PORT}) - if [ $? -eq 0 ]; then - echo "completed successfully." - else - return 1 - fi - fi - fi -} - # Materilized views functions, override with empty implementation on DBs that not supporting that install_materialized_views_func() { -- To view, visit http://gerrit.ovirt.org/25213 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a87b65a237527a84ff2a9382781e5f48923008e Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
