testcontainers / testcontainers/testcontainers-jooq-codegen-maven-plugin

Generation fails with the newest Postgres JDBC driver

Open
#46 3 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
70
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Hi all,

See https://github.com/jOOQ/jOOQ/issues/17873#issuecomment-2659265627:

When using Postgres JDBC driver 42.7.4, it works fine.
When using Postgres JDBC driver 42.7.5, generation of some tables (e.g. pgcatalog.pg_class) fails with

Error while generating table public.auth_client
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Field "key_seq" is not contained in row type (
  "PKTABLE_CAT",
  "pg_namespace"."PKTABLE_SCHEM",
  "pg_class"."PKTABLE_NAME",
  "pg_attribute"."PKCOLUMN_NAME",
  "FKTABLE_CAT",
  "pg_namespace"."FKTABLE_SCHEM",
  "pg_class"."FKTABLE_NAME",
  "pg_attribute"."FKCOLUMN_NAME",
  "KEY_SEQ",
  "UPDATE_RULE",
  "DELETE_RULE",
  "pg_constraint"."FK_NAME",
  "pg_class"."PK_NAME",
  "DEFERRABILITY"
)

errors. I suppose that all you have to do is actually update Jooq, as as documented in 17873, an update of Jooq is already published.

Thanks a lot & Cheers
Michael

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the plugin's jOOQ dependency and generation setup, then reproduce generation with PostgreSQL JDBC driver 42.7.5 and compare it with 42.7.4. Done means generation succeeds for the affected tables without the missing "key_seq" field error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postgresql
Domain
build-system, database
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.