Re: Determining the OID of a certain type

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

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2010-03-22 15:24:19 Re: pgreplay log file replayer released
Previous Message Роман Маширов 2010-03-22 15:22:38 Avoiding deadlocks on mass delete / update