Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group