Skip to content

variables with multiple values #206

Open
@jasonxu123

Description

@jasonxu123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions