From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jaimin Pan <jaimin.pan@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Jim Nasby <Jim.Nasby@bluetreble.com>
Cc: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: [BUGS] object_classes array is broken, again
Date: Tue, 29 Nov 2016 16:28:47 -0300
Message-ID: <20161129192847.3b67k3esnvpxoxu3@alvherre.pgsql> (raw)
In-Reply-To: <20150722035513.GI5596@postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@2ndquadrant.com, jaimin.pan@gmail.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, Jim.Nasby@bluetreble.com, michael.paquier@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [BUGS] object_classes array is broken, again
In-Reply-To: <20161129192847.3b67k3esnvpxoxu3@alvherre.pgsql>
References: <20150722035513.GI5596@postgresql.org> <20161129192847.3b67k3esnvpxoxu3@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox