Re: [RFC] Common object property boards - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [RFC] Common object property boards
Date
Msg-id 1312820930-sup-2152@alvh.no-ip.org
Whole thread Raw
In response to [RFC] Common object property boards  (Kohei Kaigai <Kohei.Kaigai@EMEA.NEC.COM>)
List pgsql-hackers
Excerpts from Kohei KaiGai's message of lun ago 08 12:18:47 -0400 2011:
> 2011/8/8 Robert Haas <robertmhaas@gmail.com>:

> > We could do that, but what the heck is the point?   What benefit are
> > we trying to get by not returning a pointer to the structure?  I feel
> > like we're making this ludicrously complicated with no real
> > justification of why all of this complexity is adding any value.
> >
> I agree with Robert's opinion. It seems to me we have little benefit to
> keep the structure condidential to other components.

So you coded my suggestion in an extremely awkward way just to be able
to dismiss it?

We use that pattern in a lot of places.  See get_op_opfamily_properties
for the first example I found (took my 15 secs to find it).  I don't
understand why you think it's so complicated or horrible.

Please tell me, why don't we just return Form_pg_amop in that function?

-- 
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [RFC] Common object property boards
Next
From: Tom Lane
Date:
Subject: Re: Yes, WaitLatch is vulnerable to weak-memory-ordering bugs