Repository navigation
Run COPY FROM a file of the server - #441
Merged
Merged
Conversation
tamnd
added a commit
that referenced
this pull request
Oct 20, 2026
* Add the changelog entry for #441 * Run VACUUM and ANALYZE as checks
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.
Summary
COPY ... FROM 'file'now reads a file of the server, asBeginCopyFromofcopyfrom.copens it. The regression suite loads its tables with this form intest_setup.sql.Changes
Ioof the server and reads the whole file through it. The rows then go through the same path asCOPY FROM STDIN, with the same line errors and context.42501"permission denied to COPY from a file", with the detail and the hint of PostgreSQL.42809, and a file that cannot be opened gives "could not open file ... for reading" with the text of the OS error.Known differences
COPY FROM PROGRAMgives0A000.Tests
copy_from_fileruns a file of rows, a file with a bad line, a file that does not exist, and the extended protocol, on a simulated file system.