From: nikhil raj [mailto:[email protected]]
Sent: Tuesday, 10 September 2019 12:39 AM
To: Adrian Klaver
Cc: Tom Lane; Rob Sargent; Dan Livingston; Karsten Hilbert;
[email protected]
Subject: Re: database "cdf_100_1313" does not exist
> DBLIST=/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d postgres -q -t
> -c "SELECT datname from pg_database where datname in ('CDF_100_1313')"
/usr/lib/postgresql/11/bin/psql -p 5432 -U postgres -d $DBLIST -c "GRANT
CONNECT ON DATABASE \"$DBLIST\" TO cpupdate"
Ø only in the grant its taking space rest in -d its perfectly all right.
Add –A to the options of the “select datname...” call to psql. The aligned
output is adding a space to the front of the value.