Skip to content

FORCE QUOTE flag can't be specified in flags #10

Description

@svisser

Example query that I'd like to generate:

COPY (
     select id
     from customers
     limit 1
)
TO STDOUT
WITH CSV HEADER QUOTE AS '"'
FORCE QUOTE id;

However, due to the logic in format_flag() it's not possible to pass force_quote="id" or force_quote=["id"] or force_quote=("id",) when calling copy_to() as it calls repr() in each case on those values.

I'm happy to create a pull request if this project is still being maintained?

Perhaps a solution could be to whitelist certain flag names and treat them differently when formatting?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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