Hi my application accesses Postgres database and I have many predefined 
queries(Rank,Parition,complex join etc) I fire against Postgres. Now I want 
to go for unit testing these queries behaviour with small test data. So I 
started with H2/Junit. I found out that most of Postgres queries like Rank, 
Partition, Complex case when update etc. So I thought of using H2 PosgreSQL 
compatibility mode by thinking all postgres queries will work on H2 please 
correct me if I am wrong.

I followed H2 documentation saying To use the PostgreSQL mode, use the 
database URL jdbc:h2:~/test;MODE=PostgreSQL or the SQL statement SET MODE 
PostgreSQL.

I enabled mode using SET MODE PostgreSQL and I tried to fire one of the 
query which involves rank() and works in postgres but it did not work H2. 
It gives me the following exception

Function "RANK' not found; in SQL statement

Please guide I am new to H2 and database testing. Thanks in advance. I am 
using H2 jdbc driver to fire postgres queries by thinking H2 Posgress 
compatibility mode will allow me to fire postgres queries.

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to