cockroachdb / cockroachdb/cockroach

sql: support COPY TO ... 'filename'

Open
#97,181 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement T-sql-foundations
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently COPY TO only supports copying to stdout.

See https://www.postgresql.org/docs/current/sql-copy.html

> filename
> The path name of the input or output file. An input file name can be an absolute or relative path, but an output file name must be an absolute path. Windows users might need to use an E'' string and double any backslashes used in the path name.

Jira issue: CRDB-24563

Epic CRDB-18320

Contributor guide

Open the contributing guide

Research direction

Start by locating the CockroachDB implementation and tests for COPY TO, then compare its current stdout-only behavior with the PostgreSQL COPY documentation linked in the issue. Done means COPY TO accepts an absolute output filename and behaves as documented, with coverage for the new path-based behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, sql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.