jackc / jackc/pgx

allow configuring the Config directly, without having to call `ParseConfig`

Open
#2,031 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

**Is your feature request related to a problem? Please describe.**
I work on software where the user fills in the postgres configuration into a form. then i have to construct a connection-string from the data i have (not to forget to escape stuff etc.), and then call `ParseConfig`.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
I'd like to be able to fill out a go structure (`pgconn.Config`?) with the info i already collected from the user directly, without having to consruct the connection-string.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Ideally this approach would also skip all the "compatible with C' things, like looking for stuff in default-places, read environment variables etc. but that may be a separate feature request.

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 reading the existing ParseConfig entry point and the pgconn.Config type. Trace how connection-string parsing supplies configuration, then determine the scope of a direct-configuration path; skipping defaults and environment variables is identified as a possible separate concern.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.