Hi Lukas, 1- When I specify the interpreter dialect, Jooq parses the oracle functions like decode , nvl ... but it doesn't parse the oracle cast functions like to_char(bigint) , to_number(varchar) 2- When I don't specify the interpreter dialect, Jooq parse the oracle cast functions to cast( ... as ...) but it doesn't parse the predefined functions like decode as you can see in example : SELECT DECODE(1,1 , 'One') From dual Exception in thread "main" org.postgresql.util.PSQLException: ERREUR: la fonction decode(bigint, bigint, character varying) n'existe pas Indice : Aucune fonction ne correspond au nom donné et aux types d'arguments. Vous devez ajouter des conversions explicites de type. Position : 8 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:473) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114) at org.jooq.impl.ParsingStatement.executeQuery(ParsingStatement.java:339) at com.tbs.db.TestPostgreSQL.main(TestPostgreSQL.java:31)
Even with the website https://www.jooq.org/translate/, It's the same behaviour ... Le jeu. 1 avr. 2021 à 15:25, Lukas Eder <[email protected]> a écrit : > Hi Walid, > > That's surprising, there isn't a direct link between interpreting (DDL) > and parsing. Can you show some example code that helps reproduce what > you're seeing? Perhaps there's a more complex interaction in your setup > that can't be easily derived from your description. > > Thanks, > Lukas > > On Thu, Apr 1, 2021 at 3:11 PM Walid CHAIB <[email protected]> wrote: > >> When I don't specify the interpreter dialect Joqq doesn't parse the >> oracle function like nvl and decode ... >> >> Le jeu. 1 avr. 2021 à 13:27, Lukas Eder <[email protected]> a écrit : >> >>> Hi Walid, >>> >>> You can safely ignore the interpreter dialect. It has nothing to do with >>> your current work. You only need to work with the parse dialect. But that >>> is only used to resolve ambiguous syntax (e.g. select a = b in PostgreSQL >>> vs SQL Server). >>> >>> Now, let's rewind and look at what you're actually trying to do? >>> >>> Cheers, >>> Lukas >>> >>> On Thu, Apr 1, 2021 at 1:46 PM Walid CHAIB <[email protected]> >>> wrote: >>> >>>> Hi Lukas, >>>> >>>> Is there a parameter I have to set it, so I can parse cast functions ( >>>> to_char(),to_number() ...) to cast( x as varchar ) , cast (x as int) >>>> because when specifying >>>> .withInterpreterDialect(SQLDialect.POSTGRES_12), jooq doesn't parse it, and >>>> when i didn't specify the dialect interpreter i get problems with parsing >>>> other functions like decode ? >>>> >>>> -- >>>> 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/CAOP4XxiF9P6aaD%2Bb6pwO8mPsUe_GpCxuytzs6b1Y5UFnHefFBw%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/jooq-user/CAOP4XxiF9P6aaD%2Bb6pwO8mPsUe_GpCxuytzs6b1Y5UFnHefFBw%40mail.gmail.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/CAB4ELO7%3DLVVA_ByhWW3oqMfF07GjUd156GcAfjmMUZYtsYVqow%40mail.gmail.com >>> <https://groups.google.com/d/msgid/jooq-user/CAB4ELO7%3DLVVA_ByhWW3oqMfF07GjUd156GcAfjmMUZYtsYVqow%40mail.gmail.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/CAOP4Xxhr1aUvCbA6ewyfTYKSrd3rcMfJpHD56EcgJXdLY4qJmg%40mail.gmail.com >> <https://groups.google.com/d/msgid/jooq-user/CAOP4Xxhr1aUvCbA6ewyfTYKSrd3rcMfJpHD56EcgJXdLY4qJmg%40mail.gmail.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/CAB4ELO4G%3Dt4L3YJ%2BoS%3DLUSEiWTrr7fzgOG6VgnERQM7LQ6TfDQ%40mail.gmail.com > <https://groups.google.com/d/msgid/jooq-user/CAB4ELO4G%3Dt4L3YJ%2BoS%3DLUSEiWTrr7fzgOG6VgnERQM7LQ6TfDQ%40mail.gmail.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/CAOP4Xxh3aaoiDsn1zu_040esYhAaEWxjuf%3D5AzFTu2MtHZCkhA%40mail.gmail.com.
