variables with multiple values
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 3.5k
- Forks
- 219
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Is it possible to run pgsync with a variable that is a list? e.g.
groups:
product:
products: "where id in {1}"
and
pgsync product:\(123,456\)
This syntax works if only 1 value is passed in to the variable, since the SQL evaluates to where id in (123), which is valid. But it looks like if there's a comma anywhere, it gets treated as a delimiter for a table name, so I get the error
Table not found in source: 456)
(Trying to escape the comma like \, or putting quotes " around the whole string does not make a difference.)
Thank you!
https://github.com/ankane/pgsync?tab=readme-ov-file#variables
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Variables section of README and the pgsync command shown in the report, then trace how command-line values containing commas are parsed. Done means a list such as (123,456) can be used in the documented SQL condition without treating 456) as a table name; add or update coverage if the repository provides a relevant test entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, ruby
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100