Hi Garret,

Glad to know that the workaround works for you and that you can be
productive again!

2014-04-16 17:11 GMT+02:00 Garret Wilson <[email protected]>:

> Lukas, you might think of adding a utility function that determines a
> sequence name from its table name and serial column name, as PostgreSQL
> generates sequence names automatically in the background. Just a
> suggestion.
>

Note that the PostgreSQL serial type is merely DDL syntactic sugar for

DEFAULT nextval('sequence_name'::regclass)

You can have more complex DEFAULT expressions in your DDL statement (e.g.
combining the value of two sequences, or hashing sequence values). You can
also have several sequence-generated values, or you can generate sequence
values on INSERT using triggers (which is what you'd do in Oracle). Other
databases don't support sequences, but IDENTITY or AUTO_INCREMENT columns.

Eventually, there are so many features that I think the default case of
correlating auto-generated sequence name to the underlying table name might
just not be very reliable.

Note, if you were using the code generator, then much of this information
would really be available on your tables - e.g. the identity column, in
this case.

Cheers
Lukas

-- 
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.

Reply via email to