Merged
Conversation
2547a34 to
5377eeb
Compare
j-bennet
reviewed
Nov 24, 2024
j-bennet
reviewed
Nov 24, 2024
Contributor
|
@jdpopkin thanks for the PR! It does not look like all of your changes were checked in, can you make sure? |
`\COPY` behaves exactly like `\copy` in `psql` - see [psql's slash-command-parsing function](https://github.com/postgres/postgres/blob/ea15816928c1bbcab749205a263d82daea28a3e0/src/bin/psql/command.c#L330) and note the use of `pg_strcasecmp`. So some users expect to be able to use `\COPY` in pgcli. This commit makes that happen.
5377eeb to
2c256c7
Compare
Contributor
|
Thank you @jdpopkin , merging! |
Contributor
|
Your change is released in https://pypi.org/project/pgspecial/2.1.3/. Thank you! 🌟 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
\COPYbehaves exactly like\copyinpsql- see psql's slash-command-parsingfunction and note the use of
pg_strcasecmp. So some users expect to be able to use\COPYin pgcli. This commit makes that happen.Description
psqltreats\copy,\COPY,\cOpY, etc. the same way. (See postgres source.) I hadn't known that until earlier today - a coworker who was trying outpgclifor the first time in a while was disappointed thatpgclistill doesn't support\COPY. This PR is meant to fix that.Checklist
changelog.rst.pip install pre-commit && pre-commit install), and ranblackon my code.Caveat 1: I'm not sure I used
blackcorrectly. 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.