PGUSER
PGUSER is an environment variable used by PostgreSQL client applications to specify the database user name to connect as. It is read by libpq-based tools and libraries when establishing a connection, providing a default username if none is supplied in the connection string or URL. If a user is explicitly provided in the connection string, that value takes precedence over PGUSER.
Setting PGUSER is common in shell environments. In Unix-like terminals, you can set it with export PGUSER="dbadmin".
Usage considerations include the fact that PGUSER is primarily honored by libpq-based clients (such as psql,
Security considerations are important: environment variables can be read by other processes on the same host,
See also: PGPASSWORD, PGHOST, PGPORT, PGDATABASE, and related PostgreSQL client environment variables.