Oracle Date functions to Postgres

58 views
Skip to first unread message

Walid CHAIB

unread,
Feb 24, 2021, 4:30:36 AM2/24/21
to jOOQ User Group
Hi Guys,

Thanks for this great tool.

I am working on migrating our project from oracle to postgresql 12 with jdbc and prepared statements, we are facing problems with date functions like add_months , last_day that don't exist in postgresql and jooq unable to convert it, i am wondering if there's a specific settings that i should do, sysdate also can not be converted.

Thanks in advance 

Lukas Eder

unread,
Feb 24, 2021, 5:55:19 AM2/24/21
to jOOQ User Group
Hi Walid,

Thanks a lot for your message. We currently do not have an SPI for custom syntax elements in the parser yet, but it would be very interesting to create one. See: https://github.com/jOOQ/jOOQ/issues/10243

On the other hand, we can add additional functionality for you very quickly, as support for individual functions like add_months or last_day is not that much work. Ideally, you could provide us with a list of what's important to you in the short run (here or on a different support channel), and I'll be very happy to prioritise this accordingly.

I also take from your previous messages on twitter or github, that you're still evaluating jOOQ? We can provide you with a free extended trial license so you can download the latest 3.15.0-SNAPSHOT versions and work with what's already implemented. 3.15 has already seen a lot of improvements, and will see even more until we release. Besides, the extended trial includes the source code, so you can assess how working with jOOQ will be once you make a purchasing decision (e.g. you'll be able to apply your own modifications, so you don't have to wait for new releases). If you're interested, please contact sa...@datageekery.com for an extended trial.

Best Regards,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/25fd2664-9d69-4c81-8c53-c53a0ad3a34fn%40googlegroups.com.

Walid CHAIB

unread,
Feb 24, 2021, 6:16:00 AM2/24/21
to jooq...@googlegroups.com
Thanks a lot Lukas !
For us, if the next version come with the implicit casting that will be a big big treasure for us, that's the big issue that we have currently as you know oracle does the implicit casting unlike postgresql and we have a lot of requests to migrate i am looking forward impatiently to the next version.


Lukas Eder

unread,
Feb 24, 2021, 6:57:46 AM2/24/21
to jOOQ User Group
Well, the fix is going to be implemented today: https://github.com/jOOQ/jOOQ/issues/11511
But I doubt it will be backported to 3.14, as there's are a few subtleties that could produce regressions in edge cases. So, an extended trial would give you access to the fix starting from tomorrow...

Lukas Eder

unread,
Feb 25, 2021, 8:38:15 AM2/25/21
to jOOQ User Group
If nothing goes wrong, I'll be releasing 3.14.8 this afternoon, including the fix for the cast. Other than that, regarding the issues you've encountered with missing parser support for some Oracle specific functions like ADD_MONTHS() or LAST_DAY(), there's good news. The upcoming jOOQ 3.15.0 will ship with a new parser listener SPI that allows you to hook into the parser and parse your own syntax, including the possibility to translate that to different dialects. The feature is described here:


So again, if you're interested in beta testing that on 3.15.0-SNAPSHOT, just let me know and I'll send you an extended trial license.

Cheers,
Lukas

Walid CHAIB

unread,
Feb 26, 2021, 5:02:22 AM2/26/21
to jooq...@googlegroups.com
Thanks a lot Lukas !

Yeah, i would like to test the new beta version, actually we are just facing issues with implicit casting and with date functions, if that will be resolved, it's a great achievement.


You received this message because you are subscribed to a topic in the Google Groups "jOOQ User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jooq-user/Bcl-fj69yYM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/b68ee345-ff5a-42f0-a0f5-b062f9d3b82fn%40googlegroups.com.

Lukas Eder

unread,
Feb 26, 2021, 11:46:17 AM2/26/21
to jOOQ User Group
Reply all
Reply to author
Forward
0 new messages