Why does dream seem not to establish a connection to postgres data store?

Following the dream example (replacing the sql uri with my postgres uri). I get the following error when I attempt to add comment into the form.

28.08.23 08:18:14.950      dream.http ERROR REQ 2 Request to <postgresql://localhost:5432/mydb> failed: ERt
DETAIL:  Failing row contains (null, foo).
 Query: "INSERT INTO comment (text) VALUES ($1)".
28.08.23 08:18:14.950      dream.http ERROR REQ 2 Raised at Stdlib__Map.Make.find in file "map.ml", line 135
28.08.23 08:18:14.950      dream.http ERROR REQ 2 Called from Logs.Tag.find in file "src/logs.ml", line 1542

Seems like there is not an established connection between dream and the database.

It looks like the error is not in a failed connection, but in your sql query.

DETAIL:  Failing row contains (null, foo).
 Query: "INSERT INTO comment (text) VALUES ($1)".

I see, when I change the query to "INSERT INTO comment VALUES (2, $1)", it is a success.

Thank you for the hint.