Re: Type OIDs

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Florian Weimer <fw(at)deneb(dot)enyo(dot)de>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Type OIDs
Date: 2009-06-04 01:18:22
Message-ID: 4A2720DE.6070003@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Tom Lane wrote:
> Florian Weimer <fw(at)deneb(dot)enyo(dot)de> writes:
>> Can I embed the types I'm interested in into my program, or should I
>> query the server at least once per connection to get the mapping? I'm
>> interested in types such as INTEGER, TEXT, BYTEA, etc. No user
>> defined types, and nothing fancy. Ultra-long-term portability isn't
>> required, either.
>
> Well, the type OIDs of the standard built-in types haven't changed in
> at least ten years, but that doesn't mean we won't change 'em in the
> future. I'd advise at least using the #define's from pg_type.h rather
> than writing actual numeric constants.

I'll second that. It's exactly what I've been doing in PL/R for several
years now.

Joe

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Florian Weimer 2009-06-06 10:32:07 Re: Type OIDs
Previous Message Tom Lane 2009-06-03 19:26:28 Re: Type OIDs