RE: [INTERFACES] Type mappings

Поиск
Список
Период
Сортировка
От Peter Mount
Тема RE: [INTERFACES] Type mappings
Дата
Msg-id 1B3D5E532D18D311861A00600865478C70C2EE@exchange1.nt.maidstone.gov.uk
обсуждение исходный текст
Список pgsql-interfaces
As usual when replying from here, replies prefixed with PM:

-- 
Peter Mount
Enterprise Support
Maidstone Borough Council
Any views stated are my own, and not those of Maidstone Borough Council.



-----Original Message-----
From: Alex Verstak [mailto:averstak@vt.edu]
Sent: Tuesday, March 07, 2000 3:20 PM
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Type mappings 



tomas@aura.de wrote:
> 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.
...
> - 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 ;)
 Types don't change too often.  Not often enough to hurt the UI's anyway, which is what JDBC is for.  On the other
hand,speed gain from caching type information is significant.
 

PM: Which is what JDBC does. It reads the information only when it first
needs to, then caches it in a Hashtable. 
> 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.
 It is a useful thing.  E.g. my project needs conversion between SDDF, SQL, (restricted form of) Prolog, and Jess
(don'task why--it's a long story).  I would definitely appreciate a generic type mapper.  It is feasible too.  My
chickenscratch has worked so far. :) 
 
> I would appreciate any pointers in this directions.
 JDBC source has the queries you need.  PostgreSQL manual decribes the types.  It's just a matter of sitting down and
writinga pretty wrapper/converter.
 

PM: Most of the JDBC queries came from the psql source :-)


В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: ifnull
Следующее
От: Vladimir Malyshko
Дата:
Сообщение: