Re: [BUGS] object_classes array is broken, again

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Jaimin Pan <jaimin(dot)pan(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [BUGS] object_classes array is broken, again
Date: 2016-11-29 19:28:47
Message-ID: 20161129192847.3b67k3esnvpxoxu3@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Day 2016-11-29 21:39:59 Re: parallel sequential scan returns extraneous rows
Previous Message Tom Lane 2016-11-29 16:19:13 Re: parallel sequential scan returns extraneous rows

Browse pgsql-hackers by date

  From Date Subject
Next Message Christian Ullrich 2016-11-29 19:45:13 Re: pgsql: Add putenv support for msvcrt from Visual Studio 2013
Previous Message Kuntal Ghosh 2016-11-29 19:19:13 Re: Patch: Implement failover on libpq connect level.