Re: Type OIDs - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Type OIDs
Date
Msg-id 10172.1244057188@sss.pgh.pa.us
Whole thread Raw
In response to Type OIDs  (Florian Weimer <fw@deneb.enyo.de>)
Responses Re: Type OIDs  (Joe Conway <mail@joeconway.com>)
Re: Type OIDs  (Florian Weimer <fw@deneb.enyo.de>)
List pgsql-interfaces
Florian Weimer <fw@deneb.enyo.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.
        regards, tom lane


pgsql-interfaces by date:

Previous
From: Florian Weimer
Date:
Subject: Type OIDs
Next
From: Joe Conway
Date:
Subject: Re: Type OIDs