pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Comparing Enumerated Types between JDBC and ODBC drivers
3+ messages / 2 participants
[nested] [flat]

* Comparing Enumerated Types between JDBC and ODBC drivers
@ 2010-12-21 18:14  Richard Broersma <richard.broersma@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Richard Broersma @ 2010-12-21 18:14 UTC (permalink / raw)
  To: pgsql-jdbc <pgsql-jdbc@postgresql.org>; pgsql-odbc

While testing the waters of porting a MS-Access application to OObase.
 I noticed that certain types such as Enumerated types - as well as
other types (i.e. interval), where not representable in OObase using
the JDBC driver.   However, when I used the ODBC driver for OOBase all
such types were once again representable (they were represented as
text).

Is this an issues with OOBase or an issue with the representation of
complex types using the JDBC driver?

-- 
Regards,
Richard Broersma Jr.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Comparing Enumerated Types between JDBC and ODBC drivers
@ 2010-12-22 14:11  Radosław Smogura <rsmogura@softperience.eu>
  parent: Richard Broersma <richard.broersma@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Radosław Smogura @ 2010-12-22 14:11 UTC (permalink / raw)
  To: Richard Broersma <richard.broersma@gmail.com>; +Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>; pgsql-odbc

 Hi,

 First, You need to distinguish between SQL COMPLEX / COMPOSITE types 
 (sometimes called as UDT) and PSQL internal types. Interval is internal 
 type, such like integer, varchar, etc and it's mapped in JDBC to Java 
 object from PSQL JDBC api. There is no public (JDK, OO, SUN) for 
 Interval, but you have right in your situation you can get this type by 
 calling getString() and you will get it's compatible representation, as 
 well setString() should store those, too. You can find internal types 
 which doesn't have mapping to any Java class, too.

 If you want SQL COMPOSITE types, only one way to access them (as I 
 think), is similarly, by get/set String. JDBC driver doesn't support 
 custom mapping of UDT to Java classes.

 It's looks ODBC driver has better support for PSQL.

 Kind regards,
 Radosław Smogura

 On Tue, 21 Dec 2010 10:14:18 -0800, Richard Broersma 
 <richard.broersma@gmail.com> wrote:
> While testing the waters of porting a MS-Access application to 
> OObase.
>  I noticed that certain types such as Enumerated types - as well as
> other types (i.e. interval), where not representable in OObase using
> the JDBC driver.   However, when I used the ODBC driver for OOBase 
> all
> such types were once again representable (they were represented as
> text).
>
> Is this an issues with OOBase or an issue with the representation of
> complex types using the JDBC driver?
>
> --
> Regards,
> Richard Broersma Jr.




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Comparing Enumerated Types between JDBC and ODBC drivers
@ 2010-12-22 15:20  Richard Broersma <richard.broersma@gmail.com>
  parent: Radosław Smogura <rsmogura@softperience.eu>
  0 siblings, 0 replies; 3+ messages in thread

From: Richard Broersma @ 2010-12-22 15:20 UTC (permalink / raw)
  To: Radosław Smogura <rsmogura@softperience.eu>; +Cc: pgsql-jdbc <pgsql-jdbc@postgresql.org>; pgsql-odbc

On Wed, Dec 22, 2010 at 6:11 AM, Radosław Smogura
<rsmogura@softperience.eu> wrote:

> If you want SQL COMPOSITE types, only one way to access them (as I think),
> is similarly, by get/set String. JDBC driver doesn't support custom mapping
> of UDT to Java classes.
>
> It's looks ODBC driver has better support for PSQL.

I think I understand.  Would you say that the underlying issue here is
the difference between the JDBC and ODBC specification?


-- 
Regards,
Richard Broersma Jr.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2010-12-22 15:20 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-12-21 18:14 Comparing Enumerated Types between JDBC and ODBC drivers Richard Broersma <richard.broersma@gmail.com>
2010-12-22 14:11 ` Radosław Smogura <rsmogura@softperience.eu>
2010-12-22 15:20   ` Richard Broersma <richard.broersma@gmail.com>

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