agora inbox for pljava-dev@postgresql.org  
help / color / mirror / Atom feed
Subject: [Pljava-dev] Possible to override default type mappings?
Date: Tue, 15 Aug 2006 00:41:17 +0200
Message-ID: <44E0FC0D.8010106@tada.se> (raw)
In-Reply-To: <44D68E88.2000103@goldencode.com>
References: <44D68E88.2000103@goldencode.com>

Eric Faulhaber wrote:
> Hello,
> 
> In order to use a pre-existing Java library which works with specialized
> implementations of the basic SQL types (varchar, int, etc.), I am trying
> to override the default type mappings for these types to use our
> specialized classes instead of java.lang.String, java.lang.Integer, etc.
> 
> Is this possible?  I keep getting an error:
> 
No, it's not possible and that's very intentional. I can't see any use-case where replacing 
the default mapping for a basic type would make sense. Perhaps you could elaborate this? 
Would using SQL domains help you?

> There are no errors at this stage and it looks as though the type
> mappings were set up correctly:
> 
>       test_db=# select * from sqlj.typemap_entry;
>        mapid |    javaname    |      sqlname
>       -------+----------------+--------------------
>           46 | test.integer   | pg_catalog.int4
>           47 | test.character | pg_catalog.varchar
> 
Hmm, it should yield and error. I'll have to look into that.

Regards,
Thomas Hallgren





view thread (3+ messages)  latest in thread

Message-ID: <44E0FC0D.8010106@tada.se>
Permalink:  ../44E0FC0D.8010106@tada.se/
Also on:    postgresql.org/message-id/44E0FC0D.8010106@tada.se

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: pljava-dev@postgresql.org
  Subject: Re: [Pljava-dev] Possible to override default type mappings?
  In-Reply-To: <44E0FC0D.8010106@tada.se>

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

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