Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
\COPY
behaves exactly like\copy
inpsql
- see psql's slash-command-parsingfunction and note the use of
pg_strcasecmp
. So some users expect to be able to use\COPY
in pgcli. This commit makes that happen.Description
psql
treats\copy
,\COPY
,\cOpY
, etc. the same way. (See postgres source.) I hadn't known that until earlier today - a coworker who was trying outpgcli
for the first time in a while was disappointed thatpgcli
still doesn't support\COPY
. This PR is meant to fix that.Checklist
changelog.rst
.pip install pre-commit && pre-commit install
), and ranblack
on my code.Caveat 1: I'm not sure I used
black
correctly. I managed to kick it off imperatively at some point against the whole repo, and it only seemed to make one change (deleting a blank line in a file I hadn't edited). So hopefully it's okay with whatever I've done here?Caveat 2: a couple of integration tests are red for me locally. Specifically, ones about listing users seem surprised/upset by the amount of stuff that's owned by my local macOS user and not
postgres
. I'm pretty sure this is just because I messed up setting up my local database, and not because of anything introduced by my code change? But I wanted to call attention to it in case I'm misunderstanding.