Re: determining a type oid from the name

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Thom Brown <thom(at)linux(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: determining a type oid from the name
Date: 2012-02-22 20:32:43
Message-ID: 4F4550EB.2090106@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02/22/2012 03:20 PM, Tom Lane wrote:
> Andrew Dunstan<andrew(at)dunslane(dot)net> writes:
>> Maybe I need to be more clear. The C code I'm writing will process
>> composites. I want to cache the Oids of certain non-builtin types in the
>> function info's fn_extra, and then be able to test whether or not the
>> fields in the composites are of those types.
> What's your basis for identifying those types in the first place?
> Name? Doesn't seem terribly robust if the other extension can be
> installed in some random schema. But anyway, something in
> parser/parse_type.c ought to help you with that --- maybe
> parseTypeString?
>
>

Thanks, that might do the trick.

I fully agree it's not bulletproof, but I'm not sure what alternative
there is.

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2012-02-22 20:37:29 Re: pg_upgrade --logfile option documentation
Previous Message Alvaro Herrera 2012-02-22 20:32:09 Re: REASSIGN OWNED lacks support for FDWs