H2 Database not support materialized?

869 views
Skip to first unread message

JUN LUO

unread,
Jun 4, 2021, 3:57:44 AM6/4/21
to H2 Database
When my SQL contains materialized, some exception appeared

java.util.concurrent.ExecutionException: org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "with temp_table as materialized[*] 

It successed when I remove the key word "materialized"

JDBC_URL = jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=PostgreSQL;DATABASE_TO_LOWER=TRUE

How to fix it?

Andreas Reichel

unread,
Jun 5, 2021, 8:05:52 AM6/5/21
to h2-da...@googlegroups.com
Greetings:

I do not think H2 supports MATERIALIZED within WITH CTEs: https://www.h2database.com/html/commands.html#with

Best regards
Andreas
--
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 h2-database...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/b4e48d4e-3df1-41a7-90c7-8d899f5124f5n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages