On Wednesday April 4 2007 5:37 pm, Bruce Momjian wrote:
> > Perhaps this could be added to the TODO list? I won't get
> > to it anytime soon.
>
> Yes. What should the TODO text be?
See if the attached patch is acceptable. If not, perhaps the
TODO text should be:
Enable end user to identify dependent objects when the following
error is encountered:
ERROR: role "mygroup" cannot be dropped because some objects
depend on it
DETAIL: 227 objects in this database
Index: ./src/backend/catalog/pg_shdepend.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/catalog/pg_shdepend.c,v
retrieving revision 1.17
diff -C1 -r1.17 pg_shdepend.c
*** ./src/backend/catalog/pg_shdepend.c 3 Mar 2007 19:32:54 -0000 1.17
--- ./src/backend/catalog/pg_shdepend.c 5 Apr 2007 00:05:56 -0000
***************
*** 484,488 ****
* We try to limit the number of reported dependencies to something sane,
! * both for the user's sake and to avoid blowing out memory.
*/
! #define MAX_REPORTED_DEPS 100
--- 484,497 ----
* We try to limit the number of reported dependencies to something sane,
! * both for the user's sake and to avoid blowing out memory. But since
! * this is the only way for an end user to easily identify the dependent
! * objects, make the limit pretty big. Generously assuming each object
! * description is 64 chars long, and assuming we add some commentary of
! * up to 15 chars in storeObjectDescription(), that's ~80 chars per
! * object. If we allow 2000, that's 160Kb, which is reasonable. If the
! * installer gets wild and uses 128 character names, that's still only
! * 320Kb. These sorts of high numbers of dependencies are reached quite
! * easily when a sizeable schema of hundreds of tables has specific grants
! * on each relation.
*/
! #define MAX_REPORTED_DEPS 2000
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq