Re: Determining the OID of a certain type

From: Carsten Kropf <ckropf2(at)fh-hof(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Determining the OID of a certain type
Date: 2010-03-22 15:38:09
Message-ID: 146E7B52-D850-4D10-B900-54AC991F5D10@fh-hof.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oh, thanks, that's right, I see that this function I used before, searches only in the currently used schema. The usage of parseTypeString is comparable easy, as well, so based on your hints, I will probably use this function.
Best regards
Carsten Kropf
Am 22.03.2010 um 16:23 schrieb Tom Lane:

> Carsten Kropf <ckropf2(at)fh-hof(dot)de> writes:
>> basically I looked inside these functions in parse_type.c and did not find an "easy to use" application here. So I considered trying to construct the required arguments passed to typenameType. However, during the development, I found the following function:
>> Oid
>> TypenameGetTypid(const char *typname)
>> which does indeed do the lookup of my particular type in the cache and system catalog tables. Thanks a lot for the hint!
>
> Actually, parseTypeString() is what I was thinking of. TypenameGetTypid
> won't cope with schema-qualified names, nor a lot of other cases.
>
> regards, tom lane
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dimitri Fontaine 2010-03-22 15:40:30 Re: stopping processes, preventing connections
Previous Message Greg Stark 2010-03-22 15:24:19 Re: pgreplay log file replayer released