jmcarp / jmcarp/sqlalchemy-postgres-copy
FORCE QUOTE flag can't be specified in flags
- Dominant language
- Python
- Stars
- 59
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
Example query that I'd like to generate:
```sql
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?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.