In my redhat linux system, I have a useraccount as 'postgres'
PGDATA is an environment variable in postgres user account.
How can I get the value of $PGDATA environment variable from root prompt suing 'su' or 'sudo' command.
I want to do something like this.
From postgres user account ,
I can get
root# su - postgres
-bash-2.05b$ echo $PGDATA
The same output I want from the command line of root prompt using su or sudo command.
Thanks in advance