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

From Alvaro Herrera
Subject Re: [RFC] Common object property boards
Date
Msg-id 1312228815-sup-7661@alvh.no-ip.org
Whole thread Raw
In response to Re: [RFC] Common object property boards  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Responses Re: [RFC] Common object property boards
List pgsql-hackers
Excerpts from Kohei KaiGai's message of dom jul 31 02:21:55 -0400 2011:
> 2011/7/29 Tom Lane <tgl@sss.pgh.pa.us>:

> > It would likely be better to not expose the struct type, just individual
> > lookup functions.
> >
> If so, individual functions to expose a certain property of the supplied
> object type should be provided.
> 
>   int get_object_property_catid_oidlookup(ObjectType);
>   int get_object_property_catid_namelookup(ObjectType);
>   Oid get_object_property_relation_id(ObjectType);
>   AttrNumber get_object_property_nameattnum(ObjectType);
>   AttrNumber get_object_property_namespacenum(ObjectType);
>   AttrNumber get_object_property_ownershipnum(ObjectType);

Maybe a single lookup function that receives pointers that the lookup
routine can fill with the appropriate information; allowing for a NULL
pointer in each, meaning caller is not interested in that property.

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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compressing the AFTER TRIGGER queue
Next
From: Simon Riggs
Date:
Subject: Re: Compressing the AFTER TRIGGER queue