funcool / funcool/suricatta

NULL values incorrectly being cast to varchar for pgsql dialect

Open
#13 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Clojure
Stars
81
Forks
18
PR merge metrics
No merged PRs in 30d

Description

```
user=> (fmt/sqlvec (-> (dsl/update :foo) (dsl/set :foo nil)))
["update foo set foo = ?" nil]
user=> (fmt/sqlvec (-> (dsl/update :foo) (dsl/set :foo nil)) {:dialect :postgresql})
["update foo set foo = cast(? as varchar)" nil]
```

Most likely an issue with jOOQ.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the two fmt/sqlvec examples in the issue, comparing the default and PostgreSQL dialect output. Then inspect the jOOQ integration and PostgreSQL dialect handling; done means a nil value in an update is no longer cast to varchar while the generated SQL remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, postgresql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.