Login as postgres user in mac
<p>I have a new installation of postgres in my mac using brew install.
I am trying to login to postgres user using <code>sudo -su postgres</code>
I get the error <code>postgres does not know where to find the server configuration file. You must specify the --config-file or -D invocation option or set the PGDATA environment variable in mac</code>
Can anyone please assist to point out where the error is originating from?
I want to log in as postgres and then create a new role,then create a database with owner 'newrole'.
Regards</p>