Re: [HACKERS] [PATCH] Cleanup: unify checks for catalog modification

2014-10-14 Thread Alvaro Herrera
Tom Lane wrote: > Marti Raudsepp writes: > > I happened to notice that there are no less than 14 places in the code > > that check whether a relation is a system catalog and throwing the > > error "permission denied: "foo" is a system catalog" > > > The attached patch factors all of those into a

Re: [HACKERS] [PATCH] Cleanup: unify checks for catalog modification

2014-10-14 Thread Tom Lane
Marti Raudsepp writes: > I happened to notice that there are no less than 14 places in the code > that check whether a relation is a system catalog and throwing the > error "permission denied: "foo" is a system catalog" > The attached patch factors all of those into a single > ForbidSystemTableMo

[HACKERS] [PATCH] Cleanup: unify checks for catalog modification

2014-10-14 Thread Marti Raudsepp
Hi list, I happened to notice that there are no less than 14 places in the code that check whether a relation is a system catalog and throwing the error "permission denied: "foo" is a system catalog" The attached patch factors all of those into a single ForbidSystemTableMods() function. Is this c