Received: from mailout06.btx.dtag.de (mailout06.btx.dtag.de [194.25.2.154]) by hub.org (8.9.1/8.9.1) with SMTP id IAA09761 for ; Wed, 20 Jan 1999 08:53:42 -0500 (EST) (envelope-from Guido.Goldstein@t-online.de) Received: from fwd14.btx.dtag.de (fwd14.btx.dtag.de [194.25.2.174]) by mailout06.btx.dtag.de with smtp id 102y3V-0001SR-00; Wed, 20 Jan 1999 14:52:25 +0100 Received: from seneca.nugget-soft.de (049347522-0001(btxid)@[193.159.70.2]) by fwd14.btx.dtag.de with smtp id ; Wed, 20 Jan 1999 14:51:55 +0100 Received: by seneca via sendmail from stdin id (Debian Smail3.2.0.101) for pgsql-interfaces@postgreSQL.org; Wed, 20 Jan 1999 14:42:36 +0100 (CET) To: PG-Interfaces Subject: Re: [INTERFACES] OIDs in pg_type stable across versions? References: X-Alignment: chaotic In-Reply-To: Eric Marsden's message of "20 Jan 1999 11:16:31 +0100" Date: 20 Jan 1999 14:42:36 +0100 Message-ID: Lines: 32 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" X-Sender: 049347522-0001@t-online.de From: Guido.Goldstein@t-online.de (Guido Goldstein) Moin! On 20 Jan 1999 11:16:31 +0100 Eric Marsden wrote: [snipped - low level interface for scheme] > The fe-be protocol seems to provide sufficient information to do this > type coercion: when the backend sends the attribute data in response > to a SELECT statement, it sends a sequence of tuples (name, type-id, > size). The type-id is an OID from the pg_type table. > > Is is reasonable to assume that these oids will be stable across > versions and platforms, or will I have to reconstruct a table from > a `SELECT typname, oid FROM pg_type' each time a connection is > initiated? I think, yes you should. Think of user defined types! They will be stored in pg_types also. What you can do is: cache and share this type information between all connections initiated from this process. And then, from time to time, reload the type information -- or intercept all changes on pg_type ('listen' command) and reload your type infos then. > (or maybe there's some simpler way to do the type coercions?) Not in my field of vision. HAND Guido -- In the beginning there was nothing, and then even that exploded