Role config values containing equals signs are truncated

Open Beginner friendly
#1,117 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
postgresql, typescript
Domain
database

Research direction

Start at the changeRoleConfig2Object entry point and inspect the parser described in the issue, where cur.split(=) is used. Add regression coverage for application_name=api=worker and verify that role list and retrieve responses preserve every segment after the first equals sign.

Written by the indexing model from the issue text.

Description

Description

Role list and retrieve responses truncate configuration values that contain an equals sign. For example, PostgreSQL rolconfig entry application_name=api=worker is returned as application_name: api instead of application_name: api=worker.

Reproduction

Calling changeRoleConfig2Object with:

  • application_name=api=worker
  • search_path=public

returns application_name: api while the ordinary search_path value is preserved.

Expected behavior

Only the first equals sign separates the configuration key from its value. Subsequent equals signs are part of the PostgreSQL GUC value and should round-trip unchanged.

Root cause

The parser destructures cur.split(=) into two elements, discarding all remaining value segments.

Environment

  • supabase/postgres-meta master at 641831e0555d8f9eab278014956ec2cf1ee1174d
  • Node.js 24.9.0
  • npm 11.6.0
Dominant language
TypeScript
Stars
1.2k
Forks
223
PR merge metrics
No merged PRs in 30d

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.

More from supabase/postgres-meta

All issues in supabase/postgres-meta

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.