interperting type oid in C code

From: Ken Been <kbbeen(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: interperting type oid in C code
Date: 2015-10-19 18:36:08
Message-ID: CANe84rwEKf36YJXwwnzQsTk4R2Co_1s0a4337G=_CLEg0TCPQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm working on a foreign data wrapper and I want to switch based on the
column type. Specifically, if the column type in the external table is the
same as in the (locally defined) foreign table then I can get some speedup
for some types.

Through the ForeignScanState object I can get TupleDesc and AttInMetadata
opjects, and through there I can get the Oid of the column type, but now
I'm stumped. How can I programmatically check whether Oid X refers to type
int4, or whatever?

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-10-19 18:44:23 Re: interperting type oid in C code
Previous Message romeo407 2015-10-19 18:33:29 Are there any major benefits to using point and not real data type