Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: Document COPY statement #9022

Closed
rafiss opened this issue Dec 1, 2020 · 7 comments · Fixed by #9050
Closed

sql: Document COPY statement #9022

rafiss opened this issue Dec 1, 2020 · 7 comments · Fixed by #9050
Assignees
Labels
P-1 High priority; must be done this release

Comments

@rafiss
Copy link
Contributor

rafiss commented Dec 1, 2020

CockroachDB has supported the COPY statement for the past few releases, but it is not documented.

Code changes:
cockroachdb/cockroach#8756
cockroachdb/cockroach#51890

Other docs issues:
#546
#3058
#1676
#1831
#8156
#8155

@rafiss rafiss added the A-sql label Dec 1, 2020
@rafiss
Copy link
Contributor Author

rafiss commented Dec 1, 2020

cc @ericharmeling

@ericharmeling ericharmeling added the P-1 High priority; must be done this release label Dec 1, 2020
@ericharmeling ericharmeling self-assigned this Dec 1, 2020
@ericharmeling
Copy link
Contributor

@rafiss I'm a little confused here. cockroachdb/cockroach#16392 suggests that we do not support COPY FROM STDIN, but the grammar allows the syntax: https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/parser/sql.y#L2859

@rafiss
Copy link
Contributor Author

rafiss commented Dec 1, 2020

The distinction there is that the cockroach CLI tool does not support COPY statements, but if you have an app or some other tool that sends a COPY statement to a CockroachDB server, we do support that. (Though we don't support all of the COPY syntax that Postgres has. See cockroachdb/cockroach#41608)

@ericharmeling
Copy link
Contributor

The distinction there is that the cockroach CLI tool does not support COPY statements, but if you have an app or some other tool that sends a COPY statement to a CockroachDB server, we do support that. (Though we don't support all of the COPY syntax that Postgres has. See cockroachdb/cockroach#41608)

I see. Thanks for the clarification!

This type of support seems fairly particular. Are there any other statements that you know of that are only supported if issued by some third-party clients?

@rafiss
Copy link
Contributor Author

rafiss commented Dec 1, 2020

Hmm no, off the top of my head I'm not familiar of other syntax that we support in that way, but COPY is a rather odd/special statement.

@ericharmeling
Copy link
Contributor

@rafiss Another question... do we only support executing COPY FROM (and not COPY TO)?

@rafiss
Copy link
Contributor Author

rafiss commented Dec 3, 2020

Correct, just COPY FROM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-1 High priority; must be done this release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants