[Pljava-dev] Possible to override default type mappings?

From: thomas at tada(dot)se (Thomas Hallgren)
To:
Subject: [Pljava-dev] Possible to override default type mappings?
Date: 2006-08-14 22:41:17
Message-ID: 44E0FC0D.8010106@tada.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

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

In response to

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Thomas Hallgren 2006-08-14 22:44:49 [Pljava-dev] Custom java objects
Previous Message Thomas Hallgren 2006-08-14 22:36:33 [Pljava-dev] Stack depth limit exceeded with pljava 1.2.0