WORKAROUND SOLVED! As Lukas pointed out, this is a jOOQ bug. In the meantime, I can indeed use CURRVAL(), but I have to know what I'm doing, and until now, I didn't know what I was doing.
If I create a serial in table `uris` named `uriid`, I'm really<http://www.postgresql.org/docs/9.3/static/datatype-numeric.html>creating a sequence named `uris_uriid_seq`, and this I didn't understand. To use CURRVAL(), I have to specify the name of the sequence, not the column name; that is: dslContext.resultQuery("select CURRVAL('\"uris_uriid_seq\"')").fetch(0, Integer.class) Note that one must be very, very careful<http://www.postgresql.org/docs/9.3/static/functions-sequence.html>with the single and double quotes; the best way is to have double quotes inside single quotes to prevent case changes. -- 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.
