Hi Thomas, Thanks for your response. Some comments inline
2014-02-12 20:05 GMT+01:00 Thomas Mueller <[email protected]>: > Hi, > > Hm, I'm not sure. Why would you use a varchar(1) for a boolean, and not > bit? > In Oracle, people emulate booleans with any of number(1), char(1), varchar(1). While the database doesn't know anything about booleans, the JDBC driver does and treats them like 1/0. > The following fails with PostgreSQL: > > drop table test; > create table test(val varchar(1)); > insert into test(val) values(true); -- value too long for type character > varying(1) 22001/0 > select * from test; > > It does work with MySQL. It doesn't work with Oracle, as Oracle doesn't > understand "true" ("column not allowed here"). It sounds like for both > MySQL and Oracle, > setBoolean(true) is kind of the same as setInt(1). > Precisely. > Now if PostgreSQL supports setBoolean(true) for varchar(1), then I think > H2 should support it as well (I didn't test it yet). > I had tried it, actually, and it doesn't work. You'll get the same error as when inlining the "true" literal. If you want, I can assemble a list of databases that behave like Oracle for all 16 jOOQ-supported databases by Friday. That'll put this idea in proper context. Cheers Lukas -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
