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

Поиск
Список
Период
Сортировка
Искать

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

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Keith F Irwin  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);
  
  }
  
FAQ