Hello Lukas, Forgive me I forgot to greet in both my posts :((
> Do you have any specific concerns related to casts? To explain the situation, we intend to use the same codebase on both Oracle environments and PostgreSQL environments. While most of our SQL primarily targets Oracle, it is expected to also work on PostgreSQL. We use the parser to translate the queries dynamically as they are requested. We are concerned that we'd end up with recurring performance issues on PG due to the casts. As a starting point will we have to rewrite indexes to account for the casts? Will any index created in the future have to account fo them? Since on Oracle's end this won't be needed, different scripts for each dbms would beat our goal of becoming as DB agnostic as possible. The casts are hidden to the developer, how predictable are they ? But say they weren't added, if a query is badly written and its castless translation is rendered pg-incompatible, the dev would from the start be aware of a casting issue and proceed to at least rewrite their oracle query to use an explicit cast. The casting will be visible and predictable. On Wednesday, May 1, 2024 at 11:47:19 AM UTC+2 [email protected] wrote: > Hi Ahmed, > > Casting is necessary a lot of times in PostgreSQL (much more than in > Oracle), so these automatic casts won't go away, nor is there a flag to > deactivate them. > > 1. There is not. > 2. Meta lookups always helps, yes > > Do you have any specific concerns related to casts? you said you wanted to > avoid "points of divergence," but that doesn't sound like you ran into any > actual issue. > > Best Regards, > Lukas > > On Wed, May 1, 2024 at 11:41 AM Ahmed Ghanmi <[email protected]> wrote: > >> We are using jOOQ's ParsingConnection to translate queries from ORACLE to >> POSTGRESQL. We've noticed that jOOQ was automatically adding casts in >> places where the typing is evident. Suppressing these casts is important to >> us as we do not want to add any more points of divergence between oracle >> and postgresql. >> >> 1. Is there a way to suppress automatic casting completely when using the >> parser. If not, are there any plans to implement this option? >> 2. It seems that activating meta lookups allows jOOQ to type expressions >> from the schema, which should inhibit much of the unnecessary casts (we >> have not tested this feature yet). When using meta lookups, in which cases >> will jOOQ add its own casts ? >> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jooq-user/5baa2ecb-f4bf-48ad-805d-e6c79e95f832n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jooq-user/5baa2ecb-f4bf-48ad-805d-e6c79e95f832n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/f8a2c364-c82a-491d-86e5-4ae9709b6408n%40googlegroups.com.
