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 -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers