Re: get_whatever_oid, part 1: object types with unqualifed names

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: get_whatever_oid, part 1: object types with unqualifed names
Date: 2010-06-28 16:31:56
Message-ID: 29226.1277742716@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Jun 28, 2010 at 12:17 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> True. Is it worth providing whatever_exists() macros that wrap
>> get_whatever_oid() like this, just so that callers are a bit clearer as
>> to what they're doing?

> I haven't made a detailed study of this issue, so I'm not 100% sure.
> My gut feeling however is that nearly all of the callers need the OID,
> and that some of the whatever_exists() functions wouldn't have any
> callers at all. Which makes me pretty hesitant to add them,
> especially given our decision not to centralize all the
> get_whatever_oid() functions in one place.

Well, the whatever_exists() things would just be one-liner macros
declared in the same headers that declare the underlying
get_whatever_oid() functions. So the cost of carrying ones that happen
to not be used would be nil.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mike Fowler 2010-06-28 16:39:59 Re: Issue: Deprecation of the XML2 module 'xml_is_well_formed' function
Previous Message Robert Haas 2010-06-28 16:27:39 Re: get_whatever_oid, part 1: object types with unqualifed names