Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B9F2B63513D for ; Wed, 3 Jun 2009 16:26:38 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 00812-07 for ; Wed, 3 Jun 2009 16:26:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 41DFB635068 for ; Wed, 3 Jun 2009 16:26:31 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id n53JQS5N010173; Wed, 3 Jun 2009 15:26:28 -0400 (EDT) To: Florian Weimer cc: pgsql-interfaces@postgresql.org Subject: Re: Type OIDs In-reply-to: <877hztupfn.fsf@mid.deneb.enyo.de> References: <877hztupfn.fsf@mid.deneb.enyo.de> Comments: In-reply-to Florian Weimer message dated "Wed, 03 Jun 2009 20:45:16 +0200" Date: Wed, 03 Jun 2009 15:26:28 -0400 Message-ID: <10172.1244057188@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.107 tagged_above=0 required=5 tests=AWL=0.107 X-Spam-Level: X-Archive-Number: 200906/2 X-Sequence-Number: 6870 Florian Weimer 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