Re: Insufficient privileges.

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Insufficient privileges.
Date: 2011-07-07 19:48:34
Message-ID: 4E160D92.1040007@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 07/07/11 10:03 AM, Dave Coventry wrote:
> I am getting the following error message in my Drupal install.
>
> PDOException: SQLSTATE[42501]: Insufficient privilege: 7 ERROR:
> permission denied for sequence currenttest_id_seq: INSERT INTO
> currentTest (score) VALUES (:db_insert_placeholder_0);
>
> This is a table that I created using the postgres super user.
>
> I have tried to grant the drupal user (drupaluser) privileges to the table with:
>
> GRANT ALL ON currentTest to drupaluser;
>
> but this fails to resolve the issue.
>
> Can anyone suggest a way forward?
>
> Dave Coventry
>

I recommend dropping your drupal database (since I doubt its worked
right if the objects are owned by postgres), and recreate it owned by
the drupaluser, then let the drupaluser populate it during the initial
install.

or, if I'm misreading your problem, and drupal itself is running but
this is an extra non-drupal table you manually created, then ALTER TABLE
.... OWNER drupaluser;

drupal doesn't really interface very well to non-drupal data... the
drupal approach is to define a new content type with the fields you
need, then populate it via create content, choosing that new type, or
use the various drupal APIs from your custom PHP modules.

--
john r pierce N 37, W 122
santa cruz ca mid-left coast

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-07-07 19:53:57 Re: Add Foreign Keys To Table
Previous Message David Johnston 2011-07-07 19:45:12 Re: Add Foreign Keys To Table