From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Ken Been <kbbeen(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: interperting type oid in C code |
Date: | 2015-10-19 18:44:23 |
Message-ID: | CANu8FixGQGxhum1vdV80qx6+EVqS17XCD0+HsFoo7cYyb0e6ow@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
SELECT typname
FROM pg_type
WHERE oid = Oid_x;
On Mon, Oct 19, 2015 at 2:36 PM, Ken Been <kbbeen(at)gmail(dot)com> wrote:
> 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.
>
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Been | 2015-10-19 18:51:19 | Re: interperting type oid in C code |
Previous Message | Ken Been | 2015-10-19 18:36:08 | interperting type oid in C code |