Re: ERROR: permission denied for database control

From: "Huang, Suya" <Suya(dot)Huang(at)au(dot)experian(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
Cc: 'pgsql-general General' <pgsql-general(at)postgresql(dot)org>
Subject: Re: ERROR: permission denied for database control
Date: 2014-05-08 00:45:02
Message-ID: D83E55F5F4D99B4A9B4C4E259E6227CD0148C353@AUX1EXC01.apac.experian.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you Tom and Albe. After grant connect database privilege to user test, the query runs without problem.

Thanks,
Suya

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: Thursday, May 08, 2014 12:13 AM
To: Albe Laurenz
Cc: Huang, Suya; 'pgsql-general General'
Subject: Re: [GENERAL] ERROR: permission denied for database control

Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> writes:
> Suya Huang wrote:
>> --fails if try to get all db size in one sql postgres=> SELECT
>> current_date,pg_database_size(pg_database.datname) from pg_database;
>> ERROR: permission denied for database control

> It seems like you have a database called "control" for which user "test"
> has no connect privilege.

Yeah, this failure is unsurprising. But it looks like we forgot to document the restriction :-(. I see a mention of it in the 8.3 release notes, but there's nothing in the documentation of the functions themselves. Will fix.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G Johnston 2014-05-08 01:43:55 Re: Enforce Symmetric Matrix
Previous Message Tom Lane 2014-05-07 21:19:34 Re: How to fix lost synchronization with server