working around differences with h2 PSQL compatibilty

30 views
Skip to first unread message

broccolai

unread,
Apr 8, 2024, 1:16:01 AMApr 8
to H2 Database
hi!

I'm offering psql and h2 options in my software, as well as using h2 in my tests. But I'm having an issue when trying to store json data. H2 requires "FORMAT JSON" in the value for json but this syntax isn't allowed in PSQL. I'm trying to use the same queries between both which has been fine for almost everything until this.

Anyone have any ideas?

Andreas Reichel

unread,
Apr 8, 2024, 1:57:49 AMApr 8
to h2-da...@googlegroups.com
Greetings!

You could use JSQLParser to parse your query and then transpile/rewrite it into the specific dialect.
If you would like to give me a Query sample then I will happily assist you with a template.

Cheers
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/790f0e5f-1900-40b9-a886-a5aeeb85657bn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages