Determining the OID of a certain type

From: Carsten Kropf <ckropf2(at)fh-hof(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Determining the OID of a certain type
Date: 2010-03-22 11:34:29
Message-ID: EAD7FE76-57E4-4946-989D-3112EDEF01F7@fh-hof.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi *,
I wanted to ask, if there is a method to determine the oid of a certain type using the C backend interface? I need to get access to a specific type for an IAM and therefore i want to construct an IndexTuple using the specified methods. However, I need the OID of the specific type for it. I considered writing some auxiliary function that returns the OID of the type using plpgsql. This works fine. However, I thought about something that I can use directly in C (server side) to get the oid, or do I have to set up a query to the database? Querying is currently the way I go here. However, it does not feel so right, to return the OID for the type I want to use, using a query. I hope, that there is some predefined function that I haven't found yet to determine the OID of some type (or relation etc).

Best regards,
Carsten Kropf

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-03-22 12:03:39 Re: How to dump JUST procedures/funnctions?
Previous Message Albe Laurenz 2010-03-22 08:51:15 Re: AIX postgresql error