Type mappings

From: tomas(at)aura(dot)de
To: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Type mappings
Date: 100-03-07 07:46:02
Message-ID: 200003070746.IAA08297@ns.aura.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Hi, folks

I'm trying to build a PostgreSQL interface to Guile/scheme
(with much help from others), the PostgreSQL part of squile
(see http://www.forcix.cx/squile.html).

Obe of the things squile tries is to transform the database
types into native language types.

For PostgreSQL this would imply looking things up in the
pg_types table and figuring out what to do.

I've had a peek into two of the interfaces which try to do
a type mapping: jdbc and odbc. My impression is:

- odbc tries to do a static mapping, ignoring whatever is
in the pg_types Right?

- jdbc looks the type name (via the oid, as given by PQftype())
and decides based on that. The result is cached (which to me
looks a bit problematic, since the contents of the table could
change at run time, but I may be too pedantic here ;)

It would be interesting to write up a type mapper which could be
of some more general utility (no idea whether this would be
feasible at all). I'd be willing to give it a try.

I'm sure this has been discussed at length elsewhere -- but I
didn't manage to find anything searching this list's archives.

I would appreciate any pointers in this directions.

Thanks a lot
-- tomas

Browse pgsql-interfaces by date

  From Date Subject
Next Message tomas 0100-03-07 16:29:39 Re: [INTERFACES] Type mappings