jackc / jackc/pgx

simple protocol queries must be run with client_encoding=UTF8

Open
#2,174 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
14.3k
Forks
1.1k
Avg merge
6d 9h
Merged PRs (30d)
11

Description

Describe the bug
it's not work when pg server param "server_encoding " != utf8.

To Reproduce
Steps to reproduce the behavior:

If possible, please provide runnable example such as:


Please run your example with the race detector enabled. For example, go run -race main.go or go test -race.

Expected behavior
A clear and concise description of what you expected to happen.

Actual behavior
A clear and concise description of what actually happened.

Version

  • Go: $ go version -> [e.g. go version go1.18.3 darwin/amd64]
  • PostgreSQL: $ psql --no-psqlrc --tuples-only -c 'select version()' -> [e.g. PostgreSQL 14.4 on x86_64-apple-darwin21.5.0, compiled by Apple clang version 13.1.6 (clang-1316.0.21.2.5), 64-bit]
  • pgx: $ grep 'github.com/jackc/pgx/v[0-9]' go.mod -> [e.g. v4.16.1]

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

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

Start by reproducing a simple protocol query against PostgreSQL with server_encoding set to a non-UTF8 value, then trace the pgx handling for simple protocol queries. Done means those queries work correctly when the server encoding is not UTF8; the issue provides no named files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, 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.