pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Eric Marsden <emarsden@mail.dotcom.fr>
To: pgsql-interfaces@postgreSQL.org
Subject: OIDs in pg_type stable across versions?
Date: 20 Jan 1999 11:16:31 +0100
Message-ID: <wzi3e56ckqo.fsf@mail.dotcom.fr> (raw)

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



view thread (3+ messages)  latest in thread

Message-ID: <wzi3e56ckqo.fsf@mail.dotcom.fr>
Permalink:  ../wzi3e56ckqo.fsf@mail.dotcom.fr/
Also on:    postgresql.org/message-id/wzi3e56ckqo.fsf@mail.dotcom.fr

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: emarsden@mail.dotcom.fr
  Subject: Re: OIDs in pg_type stable across versions?
  In-Reply-To: <wzi3e56ckqo.fsf@mail.dotcom.fr>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox