Received: from laas.laas.fr (root@laas.laas.fr [140.93.0.15]) by hub.org (8.9.1/8.9.1) with ESMTP id FAA18783 for ; Wed, 20 Jan 1999 05:16:42 -0500 (EST) (envelope-from emarsden@laas.fr) Received: from rossini.laas.fr (emarsden@rossini [140.93.0.47]) by laas.laas.fr (8.9.1a/8.9.1) with ESMTP id LAA28195 for ; Wed, 20 Jan 1999 11:16:35 +0100 (MET) Received: (from emarsden@localhost) by rossini.laas.fr (8.9.1a/8.9.1) id LAA12695; Wed, 20 Jan 1999 11:16:32 +0100 (MET) Sender: emarsden@rossini.laas.fr To: pgsql-interfaces@postgreSQL.org Subject: OIDs in pg_type stable across versions? Organization: LAAS-CNRS http://www.laas.fr/ MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Eric-Conspiracy: there is no conspiracy X-Attribution: ecm X-URL: http://www.chez.com/emarsden/ From: Eric Marsden Date: 20 Jan 1999 11:16:31 +0100 Message-ID: Lines: 26 X-Mailer: Gnus v5.3/Emacs 19.34 Hello, I have written a socket-level interface to PostgreSQL for scsh, an implementation of the Scheme programming language which provides a POSIX interface. Unlike Tcl or Perl, Scheme distinguishes between numbers and strings and booleans and so on (it's a real programming language :), so I'm looking at how it might be possible to convert data retrieved from the backend as a character stream into the appropriate Scheme types. 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? (or maybe there's some simpler way to do the type coercions?) -- Eric Marsden emarsden @ mail.dotcom.fr It's elephants all the way down