How to check if current user is gpadmin

Here is a simple condition to check current user:

USER=`user`
function check_user() 
{
    if [[ $USER != "gpadmin" ]]; then
        usage "you must be logged in as gpadmin"
    fi
}

Comments

Popular posts from this blog

How to set Optimizer at database level in greenplum

Changing the gpmon Password

IPMI Tool | IPMI Cheatsheet