Hi Thomas, Thanks for your message.
Unfortunately, I cannot reproduce this with jOOQ 3.11, regardless of the data type that is being used there. DDL statements should always produce inline bind variables. Can you perhaps give a more complete example? Probably the issue might be caused by a bug in what you omitted through .... E.g. do you have any custom bindings? Custom settings, etc.? Thanks, Lukas Am Di., 19. Juni 2018 um 10:11 Uhr schrieb <[email protected]>: > When I try to set a default value for a boolean column on postgres, the > generated DDL statement contains a not replaced binding. > I tried with version 3.11.0, 3.10.1, 3.10.7 and always got the same > exception. > > I do something like: > > getContext() > .createTable("mytable") > .... > .column("is_active", SQLDataType.BOOLEAN.defaultValue(true)) > .constraints( > DSL.constraint(getPKName()).primaryKey("id")) > .getSQL(); > > and get this exception: > > > exception in thread "main" org.jooq.exception.DataAccessException: SQL > [create table "myschema"."mytable"("....., "is_active" boolean null > default ?, ...... ))]; No value specified for parameter 1. > at org.jooq_3.11.0.POSTGRES.debug(Unknown Source) > at org.jooq.impl.Tools.translate(Tools.java:2380) > at > org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:737) > at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:364) > at org.jooq.impl.DefaultDSLContext.execute(DefaultDSLContext.java:1071) > ... > Caused by: org.postgresql.util.PSQLException: No value specified for > parameter 1. > at > org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:257) > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:290) > at > org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) > at > org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155) > at > org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:144) > at > org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:209) > at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:432) > at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:350) > ... 5 more > > -- > 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]. > For more options, visit https://groups.google.com/d/optout. > -- 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]. For more options, visit https://groups.google.com/d/optout.
