Re: [HACKERS] object_classes array is broken, again - Mailing list pgsql-bugs

From Alvaro Herrera
Subject Re: [HACKERS] object_classes array is broken, again
Date
Msg-id 20161129192847.3b67k3esnvpxoxu3@alvherre.pgsql
Whole thread Raw
In response to Re: [HACKERS] object_classes array is broken, again  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
Alvaro Herrera wrote:
> Jaimin Pan wrote:
> > Hi all,
> > 
> > How about this patch. I believe it will never missing someone and be
> > detected while compiling.
> 
> Hmm, yeah this looks like something that's worth considering going
> forward.  I can't think of any reason not to do this.  Perhaps we can
> write getObjectClass using this, too.

I just noticed a lot of the DropFooById() functions consist of just
"open catalog, lookup tuple by OID, delete tuple, close catalog".  Which
I think we could rewrite in a generic manner using the table proposed by
this patch, and save some boilerplate code.  Now there's a portion of
the functions that have some code in addition to that, but we can still
call the generic one and then do the rest of the stuff in the
class-specific function.  Looks like a pretty easy code removal project.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: parallel sequential scan returns extraneous rows
Next
From: Michael Day
Date:
Subject: Re: parallel sequential scan returns extraneous rows