more info in permission errors

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: more info in permission errors
Date: 2002-01-31 04:30:26
Message-ID: GNELIHDDFBOCMGBFGEFOCEDNCBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi All,

I recently had a spate of permission probs on our PHP site, with lots of log
entries like this:

2002-01-31 09:20:58 ERROR: users_stats: Permission denied.
2002-01-31 09:20:58 ERROR: recipe_recipes: Permission denied.

What I would like to see instead is:

2002-01-31 09:20:58 ERROR: Permission denied: INSERT on table "users_stats"
for "au-users".
2002-01-31 09:20:58 ERROR: Permission denied: SELECT on table
"recipe_recipes" for "au-recipes".
2002-01-31 09:20:58 ERROR: Permission denied: UPDATE on sequence "blah" for
"adsfafds".

That would have made my job of tracking down the errors MUCH easier.

I've looked in backend/catalog/aclparse.c (IIRC) but all it has is the
static string 'Permission denied'. Looks like you have to fix every call to
acl_check() Would someone with more postgres experience be able to do up a
patch for it? Or at least add it to the TODO?

I'd _love_ to have this functionality - it would have come in useful many
times in the past...

Chris

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2002-01-31 04:43:51 Kerberos and fe-auth...
Previous Message Tom Lane 2002-01-31 03:51:00 Re: RFD: schemas and different kinds of Postgres objects