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

Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Keith F Irwin <kirwin14(at)home(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [GENERAL] HELP! BUG? pg_dump mucks up grant/revoke
Date: 2001-07-29 22:15:04
Message-ID: 11087.996444904@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-general
Keith F Irwin <kirwin14(at)home(dot)com> writes:
>> [ 7.1.2 pg_dump dumps GRANT/REVOKE for a view before the view itself ]
>> 
>> This is a bug, isn't it?

Attached is the patch against 7.1.2 to fix this problem.

			regards, tom lane


*** src/bin/pg_dump/pg_dump.c.orig	Sat May 12 19:36:44 2001
--- src/bin/pg_dump/pg_dump.c	Sun Jul 29 17:31:43 2001
***************
*** 3828,3833 ****
--- 3828,3834 ----
  			   *tok,
  			   *eqpos,
  			   *priv;
+ 	char	   *objoid;
  	char	   *sql;
  	char		tmp[1024];
  	int			sSize = 4096;
***************
*** 3908,3914 ****
  
  	free(aclbuf);
  
! 	ArchiveEntry(fout, tbinfo.oid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);
  
  }
  
--- 3909,3920 ----
  
  	free(aclbuf);
  
! 	if (tbinfo.viewdef != NULL)
! 		objoid = tbinfo.viewoid;
! 	else
! 		objoid = tbinfo.oid;
! 
! 	ArchiveEntry(fout, objoid, tbinfo.relname, "ACL", NULL, sql, "", "", "", NULL, NULL);
  
  }
  

In response to

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2001-07-30 10:57:52
Subject: pg_regress fails at "point" test
Previous:From: Tom LaneDate: 2001-07-29 19:46:54
Subject: Re: timestamp (minor bug)

pgsql-general by date

Next:From: Svenne KrapDate: 2001-07-29 22:47:35
Subject: Re: "Oracle's ROWNUM"
Previous:From: Tom LaneDate: 2001-07-29 20:15:02
Subject: Re: Re: Better backtrace (wasRe: pqReadData() -- backend closed the channel unexpectedly.)

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