jackc / jackc/pgx

convertSimpleArgument converts everything to string

Open
#1,551 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
14.3k
Forks
1.1k
Avg merge
6d 9h
Merged PRs (30d)
11

Description

Could you please explain why `convertSimpleArgument` in `values.go` converts everything to `string`? If I understood correctly, it then breaks the result from `sanitize.SanitizeSQL` in `(*Conn).SanitizeForSimpleQuery`. I tried to make a simple test and the result is as expected – `int64` got converted to `string`
image
image

Contributor guide

Open the contributing guide

Research direction

Read values.go and trace convertSimpleArgument through (*Conn).SanitizeForSimpleQuery and sanitize.SanitizeSQL. Reproduce the reported int64-to-string conversion with the simple test described in the issue, then establish whether the conversion breaks the sanitized result and what behavior is expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.