RE: database "cdf_100_1313" does not exist

From: Klint Gore <kgore4(at)une(dot)edu(dot)au>
To: nikhil raj <nikhilraj474(at)gmail(dot)com>
Cc: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: RE: database "cdf_100_1313" does not exist
Date: 2019-09-09 23:54:13
Message-ID: MEAPR01MB22939B9D191D1146D55BC31FA4B70@MEAPR01MB2293.ausprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

From: nikhil raj [mailto:nikhilraj474(at)gmail(dot)com]
Sent: Tuesday, 10 September 2019 12:39 AM
To: Adrian Klaver
Cc: Tom Lane; Rob Sargent; Dan Livingston; Karsten Hilbert; pgsql-general(at)lists(dot)postgresql(dot)org
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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Prakash Ramakrishnan 2019-09-10 12:59:59 pgrounting extension in 11
Previous Message Ayub M 2019-09-09 23:50:52 Re: pgbouncer with ldap