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 12:18:08
Message-ID: 15940.1269260288@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:
> I wanted to ask, if there is a method to determine the oid of a
> certain type using the C backend interface?

Starting from what?

For built-in types it's usual practice to use the #define from
pg_type.h, if there is one. If you have a string name for the type,
there's a parser function to derive an OID, which I forget the name
of but it's probably in parse_type.c.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rob Richardson 2010-03-22 13:08:40 Re: Daylight savings time confusion
Previous Message Tom Lane 2010-03-22 12:03:39 Re: How to dump JUST procedures/funnctions?