Hi Boris, That's interesting, thanks for documenting this. The reason is that DAOs (as well as UpdatableRecords, and some other things) can only be generated when primary key information is available on the tables. Without this information, jOOQ wouldn't know how to store your POJOs. It appears that the lack of this privilege is also preventing access to data in tables like information_schema.table_constraints. Try this:
*With user postgres:* CREATE USER x PASSWORD 'x'; GRANT SELECT ON weather TO x; *With user x:* -- This yields results SELECT * FROM information_schema.tables WHERE table_name = 'weather'; -- This doesn't SELECT * FROM information_schema.table_constraints WHERE table_name = 'weather'; *Now again with user postgres:* GRANT REFERENCES ON weather TO x; *With user x:* -- This now yields the constraints on this table: SELECT * FROM information_schema.table_constraints WHERE table_name = 'weather'; Hope this helps Lukas On Wed, Aug 15, 2018 at 4:07 PM Boris Korogvich <[email protected]> wrote: > Does anyone know why JOOQ code generator needs REFERENCES privilege to > generate DAO classes? (in PostgreSQL) When I create user only with READ > privilege it ends with such message: > > [image: info_msg.PNG] > > -- > 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.
