Currently working on a project to migrate a Java service from Oracle to 
PostgreSQL 11.

Changing the compatibility mode argument in the JDBC connection string to 
PostgreSQL resulted in only a few broken tests.

jdbc:h2:./target/runtime-db;AUTO_SERVER=TRUE;CACHE_SIZE=131072;MVCC=true;
mode=PostgreSQL


These tests were only for things like the following:

*NUMBER* - Prices which are stored as `number(6,2)`

assertThat(result.getBasicPrice()).isEqualTo(expected.getBasicPrice());

Expecting: 1500
> Result: 1500.[00]
>
>
*TIMESTAMP* - Created at, updated at values

Expecting:
>   <2011-05-01T23:00>
> to have same year, month and day as:
>   <2011-05-02T00:00>
>


I have not changed any of the business logic or Java code.

>From my understanding the timestamp in Oracle and Postgres both have the 
timezones defined. 

For decimal number, I am not sure if its H2 or PostgreSQL that is adding on 
the trailing zeroes for number fields, can someone confirm this please?

I will be testing with a real PostgreSQL DB too and will compare, but any 
insight would be welcomed.

Thanks

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/50dee2f9-f734-46ac-a8d9-b4f459b6b4c0%40googlegroups.com.

Reply via email to